本章节分享一段代码实例,它实现了字符串逐字高亮效果。
代码如下:
蚂蚁部落 html, body{ background-color: #aaaaaa;}p span{ font-family: 'Comic Sans MS'; animation: loading 1.4s; -moz-animation: loading 1.4s; -webkit-animation: loading 1.4s; animation-iteration-count: infinite; -webkit-animation-iteration-count: infinite;}@keyframes loading{ 0% {color: black;} 75% {color: black;} 100% {color: white;}}@-moz-keyframes loading { 0% {color: black;} 75% {color: black;} 100% {color: white;}}@-webkit-keyframes loading{ 0% {color: black;} 75% {color: black;} 100% {color: white;}}.word1{ animation-delay:-1.2s; -webkit-animation-delay:-1.2s;}.word2{ animation-delay:-1s; -webkit-animation-delay:-1s;}.word3{ animation-delay:-0.8s; -webkit-animation-delay:-0.8s;}.word4{ animation-delay:-0.6s; -webkit-animation-delay:-0.6s; }.word5{ animation-delay:-0.4s; -webkit-animation-delay:-0.4s;}.word6{ animation-delay:-0.2s; -webkit-animation-delay:-0.2s; }.word7{ animation-delay:0s; -webkit-animation-delay:0s; }L O A D I N G
查看更多关于CSS3实现的字符串逐字高亮效果代码实例_html/css_WEB-ITnose的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did110146