html5 css3 电池电量,CSS3 液态电池充电动画

CSS

语言:

CSSSCSS

确定

@keyframes load {

0% {

top: 4.5rem;

}

70% {

top: 1.125rem;

}

90% {

top: 0;

}

95% {

top: 0;

}

100% {

top: 4.5rem;

}

}

@keyframes liquid-1 {

0% {

height: 0;

opacity: 0;

top: -0.5rem;

}

22% {

height: 0.28125rem;

top: 0.375rem;

opacity: 1;

}

25% {

top: -0.25rem;

}

35% {

height: 1.125rem;

top: -0.5rem;

}

55% {

height: 0.28125rem;

top: -0.125rem;

}

60% {

height: 0.61875rem;

opacity: 1;

top: -0.275rem;

}

96% {

height: 0.84375rem;

opacity: 0;

top: 0.5rem;

}

100% {

height: 0;

opacity: 0;

}

}

@keyframes liquid-2 {

0% {

height: 0;

opacity: 0;

top: -0.5rem;

}

17.5% {

height: 0.28125rem;

top: 0.2rem;

opacity: 1;

}

20% {

top: -0.25rem;

}

25% {

height: 1.40625rem;

top: -0.625rem;

}

45% {

height: 0.28125rem;

top: -0.125rem;

}

60% {

height: 1.40625rem;

opacity: 1;

top: -0.5rem;

}

96% {

height: 0.84375rem;

opacity: 0;

top: 0.5rem;

}

100% {

height: 0;

opacity: 0;

}

}

.battery {

display: inline-block;

position: relative;

width: 2.25rem;

height: 4.5rem;

box-shadow: 0 0 0 0.2rem #425C77;

background: white;

border-radius: 0.09rem;

}

.battery:before {

content: '';

position: absolute;

left: 0.5625rem;

right: 0.5625rem;

top: -0.3375rem;

height: 0.3375rem;

width: 1.125rem;

background: #425C77;

border-radius: 0.18rem;

}

.battery:after {

content: '';

position: absolute;

top: 0;

bottom: 0;

left: 0;

right: 0;

border-right: 2.25rem solid transparent;

border-bottom: 4.05rem solid rgba(255, 255, 255, 0.325);

}

.liquid {

position: absolute;

top: 0;

bottom: 0;

left: 0;

right: 0;

width: 2.25rem;

background: #71FB85;

animation: load 2.25s infinite;

}

.liquid:after,

.liquid:before {

content: '';

position: absolute;

top: -0.5rem;

height: 1.125rem;

width: 1.4625rem;

background: #71FB85;

border-radius: 50%;

opacity: 0;

}

.liquid:after {

right: 0;

animation: liquid-1 2.25s infinite;

}

.liquid:before {

left: 0;

animation: liquid-2 2.25s infinite;

}

body {

padding-top: 30vh;

background: #efefef;

text-align: center;

}

@keyframes power {

0% {

color: #bcbcbc;

}

75% {

color: #bcbcbc;

text-shadow: none;

}

90% {

color: #58fa70;

text-shadow: 0 0 0.8em #71FB85;

}

100% {

color: #bcbcbc;

text-shadow: none;

}

}

h5 {

font-family: Lato, sans-serif;

font-weight: 300;

letter-spacing: 0.025rem;

text-transform: uppercase;

color: #bcbcbc;

animation: power 2.25s infinite;

}

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值