首页 > 其他 > 详细

文字浪动效果

时间:2021-05-08 16:17:00      阅读:14      评论:0      收藏:0      [点我收藏+]
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title></title>
        <style type="text/css">
            body {
                background-color: #111111;
            }
            .la {
                color: #FFFFFF;
                text-align: center;
                font-size: 50px;
                font-weight: bold;
                position:relative;
                top: 300px;
                left: 0;
                -webkit-box-reflect: below 10px linear-gradient(transparent, rgba(170, 0, 0, 0.2));//设计文字倒影
            }
            .la span {
                position: relative;
                display: inline-block;
                color: #FFFFFF;
                /* font-size: 2rem; */
                text-transform: uppercase;
                animation: anima 1s ease-in-out infinite;
                animation-delay: calc(0.1s* var(--i) );
            }
            
            @keyframes anima{
                0% {
                    transform: translateY(0px);
                }
                20% {
                    transform: translateY(-10px);
                }
                40%,100% {
                    transform: translateY(0px);
                }
            }
        </style>
    </head>
    <body>
        <div class="la">
            <span style="--i:1">L</span>
            <span style="--i:2">O</span>
            <span style="--i:3">A</span>
            <span style="--i:4">D</span>
            <span style="--i:5">I</span>
            <span style="--i:6">N</span>
            <span style="--i:7">G</span>
            <span style="--i:8">.</span>
            <span style="--i:9">.</span>
            <span style="--i:10">.</span>
        </div>
    </body>
</html>

技术分享图片

文字浪动效果

原文:https://www.cnblogs.com/nightwerelonger/p/14744077.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!