css实现电池电量不足与充足表情动画效果代码

代码语言:html

所属分类:布局界面

代码描述:css实现电池电量不足与充足表情动画效果代码

代码标签: css 电池 电量 不足 充足 表情 动画

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">
<head>
   
<meta charset="UTF-8">
<style>
html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  display: flex;
  background-color: #7FFF7F;
}

.cell {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin: auto;
}

.battery__happy {
  background-color: #7FFF7F;
}
.battery__happy .face {
  border-color: #7FFF7F;
  border-radius: 0px 0px 15px 15px;
  background-color: #7FFF7F;
  height: 10px;
  animation: anim-happy 1.5s infinite;
}
.battery__happy .face:before, .battery__happy .face:after {
  background-color: #7FFF7F;
}
.battery__happy .acid {
  height: 220px;
}
.battery__happy .acid:after {
  background-color: #7FFF7F;
}

.battery__sad {
  background-color: #FF7F7F;
}
.battery__sad .face {
  border-color: #FFF transparent transparent transparent;
  border-radius: 50%;
  height: 30px;
  animation: anim-sad 5s infinite;
}
.battery__sad .face:before, .battery__sad .face:after {
  animation-delay: 1.3s;
  background-color: #FFF;
}
.battery__sad .acid {
  height: 50px;
}
.battery__sad .acid:after {
  background-color: #FF7F7F;
}

.battery {
  position: relative;
  width: 130px;
  height: 250px;
  border: 4px solid #FFF;
  border-radius: 25px;
  margin: aut.........完整代码请登录后点击上方下载按钮下载查看

网友评论0