如果我们想实现一个飞翔的烟雾字体效果,使用flash应该很容易就实现了,那么如果用css能实现吗?答案是肯定的,下面我们来看看具体如果实现?
<html> <head> <meta charset="UTF-8"> <link rel="apple-touch-icon" type="image/png" href="https://cpwebassets.codepen.io/assets/favicon/apple-touch-icon-5ae1a0698dcc2402e9712f7d01ed509a57814f994c660df9f7a952f3060705ee.png"> <meta name="apple-mobile-web-app-title" content="CodePen"> <link rel="shortcut icon" type="image/x-icon" href="https://cpwebassets.codepen.io/assets/favicon/favicon-aec34940fbc1a6e787974dcd360f2c6b63348d4b1f4e06c77743096d55480f33.ico"> <link rel="mask-icon" type="image/x-icon" href="https://cpwebassets.codepen.io/assets/favicon/logo-pin-8f3771b1072e3c38bd662872f6b673a722f4b3ca2421637d5596661b4e2132cc.svg" color="#111"> <title>css实现flash飞翔烟雾字效www.woaidaogu.com</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <style> @import url(https://fonts.googleapis.com/css?family=Finger+Paint); body { background: black; overflow: hidden; font: 5vw/100vh "Finger Paint"; text-align: center; color: transparent; -webkit-backface-visibility: hidden; backface-visibility: hidden; } span { display: inline-block; text-shadow: 0 0 0 whitesmoke; -webkit-animation: smoky 5s 3s both; animation: smoky 5s 3s both; } span:nth-child(even) { -webkit-animation-name: smoky-mirror; animation-name: smoky-mirror; } @-webkit-keyframes smoky { 60% { text-shadow: 0 0 40px whitesmoke; } to { transform: translate3d(15rem, -8rem, 0) rotate(-40deg) skewX(70deg) scale(1.5); text-shadow: 0 0 20px whitesmoke; opacity: 0; } } @keyframes smoky { 60% { text-shadow: 0 0 40px whitesmoke; } to { transform: translate3d(15rem, -8rem, 0) rotate(-40deg) skewX(70deg) scale(1.5); text-shadow: 0 0 20px whitesmoke; opacity: 0; } } @-webkit-keyframes smoky-mirror { 60% { text-shadow: 0 0 40px whitesmoke; } to { transform: translate3d(18rem, -8rem, 0) rotate(-40deg) skewX(-70deg) scale(2); text-shadow: 0 0 20px whitesmoke; opacity: 0; } } @keyframes smoky-mirror { 60% { text-shadow: 0 0 40px whitesmoke; } to { transform: translate3d(18rem, -8rem, 0) rotate(-40deg) skewX(-70deg) scale(2); text-shadow: 0 0 20px whitesmoke; opacity: 0; } } span:nth-of-type(1) { -webkit-animation-delay: 3.1s; animation-delay: 3.1s; } span:nth-of-type(2) { -webkit-animation-delay: 3.2s; animation-delay: 3.2s; } span:nth-of-type(3) { -webkit-animation-delay: 3.3s; animation-delay: 3.3s; } span:nth-of-type(4) { -webkit-animation-delay: 3.4s; animation-delay: 3.4s; } span:nth-of-type(5) { -webkit-animation-delay: 3.5s; animation-delay: 3.5s; } span:nth-of-type(6) { -webkit-animation-delay: 3.6s; animation-delay: 3.6s; } span:nth-of-type(7) { -webkit-animation-delay: 3.7s; animation-delay: 3.7s; } span:nth-of-type(8) { -webkit-animation-delay: 3.8s; animation-delay: 3.8s; } span:nth-of-type(9) { -webkit-animation-delay: 3.9s; animation-delay: 3.9s; } span:nth-of-type(10) { -webkit-animation-delay: 4s; animation-delay: 4s; } span:nth-of-type(11) { -webkit-animation-delay: 4.1s; animation-delay: 4.1s; } span:nth-of-type(12) { -webkit-animation-delay: 4.2s; animation-delay: 4.2s; } span:nth-of-type(13) { -webkit-animation-delay: 4.3s; animation-delay: 4.3s; } span:nth-of-type(14) { -webkit-animation-delay: 4.4s; animation-delay: 4.4s; } span:nth-of-type(15) { -webkit-animation-delay: 4.5s; animation-delay: 4.5s; } span:nth-of-type(16) { -webkit-animation-delay: 4.6s; animation-delay: 4.6s; } span:nth-of-type(17) { -webkit-animation-delay: 4.7s; animation-delay: 4.7s; } span:nth-of-type(18) { -webkit-animation-delay: 4.8s; animation-delay: 4.8s; } span:nth-of-type(19) { -webkit-animation-delay: 4.9s; animation-delay: 4.9s; } span:nth-of-type(20) { -webkit-animation-delay: 5s; animation-delay: 5s; } span:nth-of-type(21) { -webkit-animation-delay: 5.1s; animation-delay: 5.1s; } </style> <script> window.console = window.console || function (t) { }; </script> <script> if (document.location.search.match(/type=embed/gi)) { window.parent.postMessage("resize", "*"); } </script> </head> <body translate="no"> <span>C</span><span>S</span><span>S</span><span> </span><span>S</span><span>m</span><span>o</span><span>k</span><span>y</span><span> </span><span>T</span><span>e</span><span>x</span><span>t</span><span> </span><span>E</span><span>f</span><span>f</span><span>e</span><span>c</span><span>t</span> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <div id="xl_chrome_ext_{4DB361DE-01F7-4376-B494-639E489D19ED}" style="display: none;"> <div></div> <a id="xl_chrome_ext_download" href="javascript:;">下载视频</a> <a id="xl_chrome_ext_close" href="javascript:;"></a> </div> </body> </html>
通过以上内容我们知道了css如何实现flash飞翔烟雾字效?感谢您访问“我爱捣鼓(www.woaidaogu.com)”网站的内容,希望对大家有所帮助!引用本文内容时,请注明出处!谢谢合作!