HTML特效

HTML:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="CSS/huojina.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel=""stylesheet>

</head>
<body>
    <div class="loader">
        <div class="rocket">
            <i class="fa fa-rocket" aria-hidden="true"></i>
            <i class="fa fa-cloud" aria-hidden="true" style="--i:0"></i>
            <i class="fa fa-cloud" aria-hidden="true" style="--i:1"></i>
            <i class="fa fa-cloud" aria-hidden="true" style="--i:2"></i>
            <i class="fa fa-cloud" aria-hidden="true" style="--i:3"></i>
        </div>
        <span><i></i></span>
    </div>
</body>
</html>

CSS:

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body{
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #eaeef0;
}
.loader{
    position: relative;
    display: flex;
}

.loader span{
    position: relative;
    width: 250px;
    height: 250px;
    background: #eaeef0;
    border: 6px solid #eaeef0;
    border-radius: 50%;
    box-shadow: -8px -8px 15px rgba(255,255,255,1),
8px 8px 25px rgba(0,0,0,0.15);
    overflow: hidden;
}
.loader span::before{
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: inset 10px 10px 20px rgba(0,0,0,0.5),
inset -5px -5px 15px rgba(255,255,255,1);
}
.loader span::after{
    content: "";
    position: absolute;
    inset: 40px;
    background: #eaeef0;
    border: 3px solid #eaeef0;
    border-radius: 50%;
    box-shadow: -8px -8px 25px rgba(255,255,255,1),
8px 8px 25px rgba(0,0,0,0.25),
inset 3px 3px 10px rgba(0,0,0,0.15),
inset -1px -1px 15px rgba(255,255,255,1);
}
.loader span i {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    filter: blur(5px);
    background: linear-gradient(#42abff,#ff4f8b,#ffeb3b);
    animation: animate 1s linear infinite;
}
@keyframes animate {
    0%{
        transform: rotate(0deg);
    }
    100%{
        transform: rotate(360deg);
    }
}

.rocket{
    position: absolute;
    inset: 50px;
    z-index: 10;
    display: flex;
    border-radius: 50% ;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.rocket .fa-rocket{
    position: absolute;
    color: #ff518c;
    font-size: 3.5em;
    -webkit-text-stroke: 2px #000;
    animation: animateRocket 0.2s linear infinite;
}
@keyframes animateRocket {
    0%,100%{
        transform: translate(0px,0px) rotate(-45deg);
    }
    50%{
        transform: translate(0px,-3px) rotate(-45deg);
    }
}
.fa-cloud{
    position: absolute;
    top: calc(35px * var(--i));
    left: calc(45px * var(--i));
    font-size: 2em  ;
    color: white;
    -webkit-text-stroke: 2px #000;
    animation: animateClouds 1s linear infinite;
    animation-delay: calc(-0.5s * var(--i));
}
@keyframes animateClouds {
    0%{
        transform: translateY(calc(-35 * 5px));
    }
    100%{
        transform: translateY(calc(35 * 5px));
    }
}

第二个CSS详情见我的前端图标分享:

https://blog.csdn.net/qq_60213361/article/details/123038138?spm=1001.2014.3001.5501

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值