首页 建站教程 WEB前端 正文

纯css实现文字音符跳动效果

通过纯css实现文字音符跳动效果 完整代码: <!doctype html> <html> <head> <meta charset="utf-8"> <title>纯css文...

通过纯css实现文字音符跳动效果

纯css实现文字音符跳动效果 CSS音符跳动 CSS文字跳动 图1

完整代码:

<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
        <title>纯CSS文字跳动音符效果</title>
        <style>
            html,
            body {
                width: 100%;
                height: 100%;
                background: #00ffac;
                background: -webkit-linear-gradient(45deg, #00ffac 0%, #0472FF 100%);
                background: -webkit-linear-gradient(45deg, #00ffac 0%, #0472FF 100%);
                background: linear-gradient(45deg, #00ffac 0%, #0472FF 100%);
                overflow: hidden;
                -webkit-font-smoothing: antialiased;
                display: -webkit-box;
                display: -webkit-flex;
                display: -ms-flexbox;
                display: flex;
                -webkit-box-pack: center;
                -webkit-justify-content: center;
                -ms-flex-pack: center;
                justify-content: center;
                -webkit-box-align: center;
                -webkit-align-items: center;
                -ms-flex-align: center;
                align-items: center;
            }

            h1 {height: 100px;}

            h1 span {
                position: relative;
                top: 20px;
                display: inline-block;
                -webkit-animation: bounce .3s ease infinite alternate;
                animation: bounce .3s ease infinite alternate;
                font-family: 'Titan One', cursive;
                font-size: 80px;
                color: #FFF;
                text-shadow: 0 1px 0 #CCC,
                    0 2px 0 #CCC,
                    0 3px 0 #CCC,
                    0 4px 0 #CCC,
                    0 5px 0 #CCC,
                    0 6px 0 transparent,
                    0 7px 0 transparent,
                    0 8px 0 transparent,
                    0 9px 0 transparent,
                    0 10px 10px rgba(0, 0, 0, .4);
            }

            h1 span:nth-child(2) {
                -webkit-animation-delay: .1s;
                animation-delay: .1s;
            }

            h1 span:nth-child(3) {
                -webkit-animation-delay: .2s;
                animation-delay: .2s;
            }

            h1 span:nth-child(4) {
                -webkit-animation-delay: .3s;
                animation-delay: .3s;
            }

            h1 span:nth-child(5) {
                -webkit-animation-delay: .4s;
                animation-delay: .4s;
            }

            h1 span:nth-child(6) {
                -webkit-animation-delay: .5s;
                animation-delay: .5s;
            }

            h1 span:nth-child(7) {
                -webkit-animation-delay: .6s;
                animation-delay: .6s;
            }

            @-webkit-keyframes bounce {
                100% {
                    top: -20px;
                    text-shadow: 0 1px 0 #CCC,
                        0 2px 0 #CCC,
                        0 3px 0 #CCC,
                        0 4px 0 #CCC,
                        0 5px 0 #CCC,
                        0 6px 0 #CCC,
                        0 7px 0 #CCC,
                        0 8px 0 #CCC,
                        0 9px 0 #CCC,
                        0 50px 25px rgba(0, 0, 0, .2);
                }
            }

            @keyframes bounce {
                100% {
                    top: -20px;
                    text-shadow: 0 1px 0 #CCC,
                        0 2px 0 #CCC,
                        0 3px 0 #CCC,
                        0 4px 0 #CCC,
                        0 5px 0 #CCC,
                        0 6px 0 #CCC,
                        0 7px 0 #CCC,
                        0 8px 0 #CCC,
                        0 9px 0 #CCC,
                        0 50px 25px rgba(0, 0, 0, .2);
                }
            }
        </style>
    </head>
    <body>
        <h1>
            <span>u</span>
            <span>m</span>
            <span>T</span>
            <span>h</span>
            <span>e</span>
            <span>m</span>
            <span>e</span>
        </h1>
    </body>
</html>

演示效果

打赏
海报

声明:本站部分资源内容为站内原创著作,也有部分基于互联网公开分享整理,版权归原作者所有。
如侵犯到您的权益,请联系本站,我们会尽快处理,谢谢。转摘请注明出处

本文链接:https://www.umtheme.com/web/206.html

相关推荐

CSS心形缠绕转动效果

CSS心形缠绕转动效果

CSS心形缠绕转动效果是一种有趣的动画效果,能够给网页带来浪漫而动感的氛围。这个效果将一个心形图案无限旋转,并且同时绕着一个中心点缠绕旋...
WEB前端 2023.09.13 0 2159
制作h5常用的css3动画效果

制作h5常用的css3动画效果

css3提供了许多强大的特效,可以用来实现各种各样的效果,下面是我总结的一些常用的css3效果,有需要的可以直接引用:1.悬浮时放大:.one{transition:All 0.4s&nb...
WEB前端 2023.09.13 0 1940
发布评论

ainiaobaibaibaibaobaobeishangbishibizuichiguachijingchongjingdahaqiandaliandangaodw_dogedw_erhadw_miaodw_tuzidw_xiongmaodw_zhutouganbeigeiliguiguolaiguzhanghahahahashoushihaixiuhanheixianhenghorse2huaixiaohuatonghuaxinhufenjiayoujiyankeaikeliankouzhaokukuloukunkuxiaolandelinileimuliwulxhainiolxhlikelxhqiuguanzhulxhtouxiaolxhwahahalxhzanningwennonuokpinganqianqiaoqinqinquantouruoshayanshengbingshiwangshuaishuijiaosikaostar0star2star3taikaixintanshoutianpingtouxiaotuwabiweifengweiquweiwuweixiaowenhaowoshouwuxiangjixianhuaxiaoerbuyuxiaokuxiaoxinxinxinxinsuixixixuyeyinxianyinyueyouhenghengyuebingyueliangyunzanzhajizhongguozanzhoumazhuakuangzuohenghengzuoyi
感谢您的支持