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

css实现ps高斯模糊立体枫叶效果

2022/5/7 21:36:29

ps的功能很强大,高斯模糊等一些效果做起来非常easy,今天我们就用css来实现一个ps高斯模糊立体枫叶的效果<html><head> <meta charset="UTF-8"> <link rel="apple-touch-icon" type="image/png" href="htt…

        ps的功能很强大,高斯模糊等一些效果做起来非常easy,今天我们就用css来实现一个ps高斯模糊立体枫叶的效果

image.png

<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实现ps高斯模糊立体枫叶效果www.woaidaogu.com</title>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
  <style>
    body,
    html {
      width: 100%;
      height: 100%;
      overflow: hidden;
    }
    section {
      height: 100%;
      width: 100%;
      position: absolute;
      background: radial-gradient(#333, #000);
    }
    .leaf {
      position: absolute;
      width: 100%;
      height: 100%;
      top: 0;
      left: 0;
    }
    .leaf img {
      width: 75px;
      height: 75px;
    }
    .leaf div {
      position: absolute;
      display: block;
    }
    .leaf div:nth-child(1) {
      left: 20%;
      animation: fall 22s linear infinite;
      animation-delay: -2s;
    }
    .leaf div:nth-child(2) {
      left: 70%;
      animation: fall 18s linear infinite;
      animation-delay: -4s;
    }
    .leaf div:nth-child(3) {
      left: 10%;
      animation: fall 21s linear infinite;
      animation-delay: -7s;
    }
    .leaf div:nth-child(4) {
      left: 50%;
      animation: fall 24s linear infinite;
      animation-delay: -5s;
    }
    .leaf div:nth-child(5) {
      left: 85%;
      animation: fall 19s linear infinite;
      animation-delay: -5s;
    }
    .leaf div:nth-child(6) {
      left: 15%;
      animation: fall 23s linear infinite;
      animation-delay: -10s;
    }
    .leaf div:nth-child(7) {
      left: 90%;
      animation: fall 20s linear infinite;
      animation-delay: -4s;
    }
    @keyframes fall {
      0% {
        top: -30%;
        transform: translateX(20px) rotate(0deg);
      }
      20% {
        transform: translateX(-20px) rotate(45deg);
      }
      40% {
        transform: translateX(20px) rotate(90deg);
      }
      60% {
        transform: translateX(-20px) rotate(135deg);
      }
      80% {
        transform: translateX(20px) rotate(180deg);
      }
      100% {
        top: 150%;
        transform: translateX(-20px) rotate(225deg);
      }
    }
    h2 {
      position: absolute;
      top: 40%;
      width: 100%;
      font-size: 3em;
      text-align: center;
      color: #fff;
      transform: translateY(-50%);
      z-index: 1;
    }
    .leaf2 {
      transform: scale(1.6) translate(5%, -5%) rotate(15deg);
      filter: blur(1px);
      z-index: 10;
    }
    .leaf3 {
      filter: blur(2px);
      transform: scale(0.8) translate(-5%, 10%) rotate(170deg);
    }
  </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">
  <h2>Falling Leaves</h2>
  <section>
    <div>
      <div><img src="http://premiumcoding.com/CSSTricks/fallingLeaves/leaf.png"></div>
      <div><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/leaf5.png"></div>
      <div><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/leaf4.png"></div>
      <div><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/leaf6.png"></div>
      <div><img src="https://orig15.deviantart.net/a87c/f/2015/205/f/4/autumn_png_by_vanessarebelangel-d92nw23.png">
      </div>
      <div><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/leaf5.png"></div>
      <div><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/leaf5.png"></div>
    </div>
    <div class="leaf leaf2">
      <div><img src="https://orig15.deviantart.net/a87c/f/2015/205/f/4/autumn_png_by_vanessarebelangel-d92nw23.png">
      </div>
      <div><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/leaf5.png"></div>
      <div><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/leaf4.png"></div>
      <div><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/leaf6.png"></div>
      <div><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/leaf5.png"></div>
      <div><img src="https://orig15.deviantart.net/a87c/f/2015/205/f/4/autumn_png_by_vanessarebelangel-d92nw23.png">
      </div>
      <div><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/leaf5.png"></div>
    </div>
    <div class="leaf leaf3">
      <div><img src="http://premiumcoding.com/CSSTricks/fallingLeaves/leaf.png"></div>
      <div><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/leaf5.png"></div>
      <div><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/leaf4.png"></div>
      <div><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/leaf6.png"></div>
      <div><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/leaf5.png"></div>
      <div><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/leaf5.png"></div>
      <div><img src="https://orig15.deviantart.net/a87c/f/2015/205/f/4/autumn_png_by_vanessarebelangel-d92nw23.png">
      </div>
    </div>
  </section>
  <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如何实现ps高斯模糊立体枫叶效果?感谢您访问“我爱捣鼓(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