css单选radio按钮样式css多选框checkbox样式css响应式汉堡菜单(左滑、抽屉)css实现遮罩层弹出效果一组好看的css按钮效果(6种)css实现select下拉选择框css实现选项卡功能css实现下拉菜单css按钮样式代码(16种)css实现手风琴效果css图片轮播效果css进度条样式css实现侧边栏菜单css加载动画css背景动画效果css开关按钮样式(18种)css炫酷的圆形菜单css提示tooltip效果css手风琴_好看的Gallery伸缩效果css表格样式css分段控件导航栏css折角效果css粒子背景动画效果css进度圆圈连线css响应式分页样式代码css各种天气样式动画图标css层叠卡片滑出特效css下拉Dropdown菜单css圆圈按钮tip提示特效css和svg圆圈进度样式代码css动画404页面代码css爱心跳动动画代码css绘制逼真玻璃球效果css模拟开关灯特效创意css网格布局带动画效果css星级打分radio五角星css卡片悬浮翻转特效div上下浮动纯css动画css时间轴样式(timeLine)css文字循环翻滚动画效果css输入框动效css鼠标悬停缩放比例效果css模糊背景毛玻璃效果css实现小球循环跳动动画css实现标签样式Tagscss进度条阴影动画css绘制的小鸟css svg按钮冒泡动画特效css svg蓝色波浪动画特效css创意svg菜单栏水滴动画css文字进度条的实现CSS实现内容折叠/展开效果CSS3手机充电特效css实现鼠标点击拖拽效果CSS实现一个计时器纯CSS渐变绘制 Chrome 图标CSS 渐变来实现波浪动画

CSS3手机充电特效

88.8%


源码

<div class="charging">
<div class="box">
<div class="number">88.8%</div>
<div class="contrast">
<div class="bubble"></div>
<div class="bubble"></div>
<div class="bubble"></div>
<div class="bubble"></div>
<div class="bubble"></div>
<div class="bubble-home"></div>
<div class="circle"></div>
</div>
</div>
</div>
<style>
.charging{
width: 100%;
height: 500px;
background: #000;
}
.charging .box{
width: 800px;
height: 100%;
margin: 0 auto;
position: relative;
}
.charging .number{
width: 200px;
height: 200px;
text-align: center;
line-height: 200px;
color: #fff;
font-size: 30px;
position: absolute;
left: 50%;
top: 5%;
margin-left: -100px;
z-index: 1;
}
.charging .contrast{
width: 100%;
height: 100%;
background: #000;
position: relative;
/* 设置对比度 */
filter: contrast(15);
/* 执行动画:动画名 时长 线性的 无限次播放 */
animation: hueRotate 5s linear infinite;
}
/* 变色动画 */
@keyframes hueRotate {
0%{/* contrast是设置对比度,hue-rotate是颜色滤镜 通过设置度数来改变颜色 */
filter: contrast(15) hue-rotate(0);
}
100%{
filter: contrast(15) hue-rotate(360deg);
}
}
.charging .circle{
width: 300px;
height: 300px;
position: absolute;
top: 0;
left: 50%;
margin-left: -150px;
/* 设置模糊度,配合上面的contrast可以产生粘性的效果 */
filter: blur(8px);
/* 执行动画 */
animation: circleRotate 5s linear infinite;
}
/* 外圈 */
.charging .circle::before{
content: "";
width: 200px;
height: 200px;
background: cyan;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
border-radius: 42% 38% 63% 49% / 45%;
}
/* 中心圆(黑色) */
.charging .circle::after{
content: "";
width: 178px;
height: 178px;
background: #000;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
border-radius: 50%;
}
/* 圆旋转动画 */
@keyframes circleRotate {
0%{
transform: rotate(0);
}
100%{
transform: rotate(360deg);
}
}
/* 冒泡的底座 */
.charging .bubble-home{
width: 100px;
height: 40px;
background: cyan;
position: absolute;
left: 50%;
bottom: 0;
margin-left: -50px;
border-radius: 100px 100px 0 0;
/* 模糊度 */
filter: blur(8px);
}
/* 泡泡 */
.charging .bubble{
width: 20px;
height: 20px;
background: cyan;
border-radius: 100%;
position: absolute;
left: 50%;
bottom: 0;
transform: translateX(-50%);
z-index: 2;
filter: blur(5px);
/* 执行动画:动画名 时长 加速后减速 无限次播放 */
animation: bubbleUp 5s ease-in-out infinite;
}
/* 分别为每一个泡泡设置大小、位置、动画时长、动画延迟 */
.charging .bubble:nth-child(1){
width: 20px;
height: 20px;
left: 50%;
animation-duration: 5s;
animation-delay: 1s;
}
.charging .bubble:nth-child(2){
width: 22px;
height: 22px;
left: 49%;
animation-duration: 4s;
animation-delay: 2s;
}
.charging .bubble:nth-child(3){
width: 24px;
height: 24px;
left: 47%;
animation-duration: 3s;
animation-delay: 3s;
}
.charging .bubble:nth-child(4){
width: 18px;
height: 18px;
left: 53%;
animation-duration: 3s;
animation-delay: 4s;
}
.charging .bubble:nth-child(5){
width: 26px;
height: 26px;
left: 51%;
animation-duration: 4s;
animation-delay: 5s;
}
/* 冒泡动画 */
@keyframes bubbleUp {
0%{
bottom: 0;
}
100%{
bottom: calc(100% - 260px);
}
}
</style>


链接: https://www.fly63.com/course/33_1627