网站链接: 我爱捣鼓
当前位置: 首页 > 前端开发 > css

css实现flash飞翔烟雾字效

2022/4/18 20:41:02

如果我们想实现一个飞翔的烟雾字体效果,使用flash应该很容易就实现了,那么如果用css能实现吗?答案是肯定的,下面我们来看看具体如果实现?<html><head> <meta charset="UTF-8"> <link rel="apple-touch-icon" type="…

        如果我们想实现一个飞翔的烟雾字体效果,使用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>&nbsp;</span><span>S</span><span>m</span><span>o</span><span>k</span><span>y</span><span>&nbsp;</span><span>T</span><span>e</span><span>x</span><span>t</span><span>&nbsp;</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>

image.png

        查看在线实例

        通过以上内容我们知道了css如何实现flash飞翔烟雾字效?感谢您访问“我爱捣鼓(www.woaidaogu.com)”网站的内容,希望对大家有所帮助!引用本文内容时,请注明出处!谢谢合作!

相关资讯

  • 设置英文首字母大写的css属性是什么?

    设置CSS text-transform 的属性为capitalize就可以实现英文首字母大写。 定义和用法  text-transform 属性控制文本的大小写。 属性值 值 描 述 none 默认。定义带有小写字…

    2021/7/14 20:35:17
  • 只让页面显示横滚动条,不显示竖滚动条如何实现?

    只让页面显示横滚动条,不显示竖滚动条的方法其实很简单,主要用到body的两个css属性 overflow和 overflow-y,如下所示:body { overflow:scroll; overflow-y:hidden;}

    2021/2/28 21:45:25
  • 网页的滚动条样式可以修改吗?如何修改?

    网页的滚动条样式可以修改的,主要是使用css来控制那如何修改呢?如下代码:<div class="inner"> <div class="innerbox"> <p style="height:200px;">这是内容111</p> <p style="hei…

    2021/2/28 21:15:24
  • css如何实现6张图片均匀排列在一行?

    css部分如下:img{width:120px; height:80px;float:left;margin-right:16px;}.img3{margin-right:0;}html部分如下:<img src="images/001.jpg" /><img src="images/002.jpg" /><img src="images/003.jpg" /><img src=…

    2021/2/28 21:10:01