CSS特效代码集锦

53 篇文章 0 订阅
8 篇文章 1 订阅

css最好看的动画特效,动画效果有: 图片放大镜, 3D相册, 立方体相册, 昼夜更替特效, 飘雪, 七彩雨, 签名生成器, 水波纹动画 穿越时空特效等,喜欢的可以收藏。

代码部分
 <section>
      <div class="content">
        <h2>Live</h2>
        <h2>Live</h2>
      </div>
 </section>
 <style>
      @import url("https://fonts.googleapis.com/css?family=Poppins:100,200,300,400,500,600,700,800,900");
      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        font-family: "Poppins", sans-serif;
      }
      body {
        display: flex;
        background: #000;
        min-height: 100vh;
        align-items: center;
        justify-content: center;
      }
      .content {
        position: relative;
      }
      .content h2 {
        color: #fff;
        font-size: 8em;
        position: absolute;
        transform: translate(-50%, -50%);
      }
      .content h2:nth-child(1) {
        color: transparent;
        -webkit-text-stroke: 2px #03a9f4;
      }
      .content h2:nth-child(2) {
        color: #03a9f4;
        animation: animate 4s ease-in-out infinite;
      }
      @keyframes animate {
        0%,
        100% {
          clip-path: polygon(0% 45%, 16% 44%, 33% 50%, 54% 60%, 70% 61%, 84% 59%, 100% 52%, 100% 100%, 0% 100%);
        }

        50% {
          clip-path: polygon(0% 60%, 15% 65%, 34% 66%, 51% 62%, 67% 50%, 84% 45%, 100% 46%, 100% 100%, 0% 100%);
        }
      }
      .page-footer {
        position: fixed;
        right: 35px;
        bottom: 20px;
        display: flex;
        align-items: center;
        padding: 5px;
        color: black;
        background: rgba(255, 255, 255, 0.65);
      }
      .page-footer a {
        display: flex;
        margin-left: 4px;
      }
      .touxiang {
        bottom: 0px;
        width: 30px;
        height: 30px;
      }
 </style>

完整代码可查看​ ​附件链接​​

图片放大镜特效

在这里插入图片描述

3D相册特效

在这里插入图片描述

立方体相册特效

在这里插入图片描述

昼夜更替特效

在这里插入图片描述

飘雪动画

在这里插入图片描述

七彩雨特效

在这里插入图片描述

签名生成器

在这里插入图片描述

水波纹动画

在这里插入图片描述

穿越时空特效

在这里插入图片描述

  • 5
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
以下是几个炫酷的CSS特效示例: 1. 3D按钮效果: ```css .button { display: inline-block; padding: 10px 20px; color: #fff; background-color: #1abc9c; border: none; border-radius: 5px; position: relative; overflow: hidden; transition: all 0.3s ease-in-out; } .button::before { content: ""; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background-color: rgba(255, 255, 255, 0.2); transform: perspective(500px) rotateY(90deg) translateZ(-10px); transition: all 0.3s ease-in-out; } .button:hover { background-color: #16a085; } .button:hover::before { left: 0; transform: perspective(500px) rotateY(0deg) translateZ(0); } ``` 2. 悬浮效果: ```css .container { position: relative; width: 300px; height: 200px; perspective: 800px; } .card { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotateY(0deg); width: 100%; height: 100%; background-color: #fff; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); transition: all 0.3s ease-in-out; } .card:hover { transform: translate(-50%, -50%) rotateY(180deg); } .card::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.1); z-index: 1; } .card::after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: linear-gradient(to bottom right, #3498db, #1abc9c); z-index: -1; transform: rotateY(180deg); } ``` 3. 模糊背景效果: ```css .container { position: relative; width: 100%; height: 100%; } .image { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: url("path/to/image.jpg"); background-size: cover; filter: blur(10px); z-index: -1; } .content { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 20px; background-color: rgba(255, 255, 255, 0.8); border-radius: 5px; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); } ```

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值