仿手机充电效果动画制作

本文介绍如何利用CSS3实现一个逼真的手机充电效果,包括详细的CSS样式表设置和HTML文件结构,帮助读者理解并创建此类动画。
摘要由CSDN通过智能技术生成

效果图

在这里插入图片描述

一、CSS样式表

* {
   
    margin: 0;
    padding: 0;
}

body {
   
    background: #000;
}

.box {
   
    width: 800px;
    height: 600px;
    background: #000;
    margin: 50px auto;
    padding-top: 50px;
    position: relative;
}

.contrast {
   
    width: 100%;
    height: 100%;
    background-color: #000;
    overflow: hidden;
    filter: contrast(15) hue-rotate(0);
    position: relative;
    animation: hueRotate 6s linear infinite;
}

@keyframes hueRotate {
   
    0% {
   
        filter: contrast(15) hue-rotate(0);
    }

    100% {
   
        filter: contrast(15) hue-rotate(360deg);
    }
}

.circle {
   
    width: 300px;
    height: 300px;
    position: absolute;
    top: 10px;
    left: 50%;
    margin-left: -150px;
    box-sizing: border-box;
    filter: blur(8px);
    animation: circleRotate 6s linear infinite;

}

.circle::before {
   
    content: "";
    height: 200px;
    width: 200px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(0);
    background: #00ff6f;
    border-radius: 42% 38% 62% 49% / 45%;

}

.circle::after {
   
    content
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值