css实现苹果iphone手机充电指示指引引导动画效果代码

代码语言:html

所属分类:动画

代码描述:css实现苹果iphone手机充电指示指引引导动画效果代码

代码标签: css 苹果 iphone 手机 充电 指示 指引 引导 动画

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

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  

  
  
  
<style>
@import url('https://fonts.googleapis.com/css?family=Spartan&display=swap');
body{
  font-family: 'Spartan';
  font-weight: 100 !important;
  overflow: hidden;
  margin: 0;

  background-color: #3f51b5;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}


.container{
  width: 100vw;
  height: 100vh;
  display: table-cell;
  vertical-align: middle;
  text-align: center;
}
.device{
  width: 220px;
  height: 450px;
  background-color: #F5F6F8;
  border: 4px solid #D0D2D1;
  margin: auto;
  border-radius: 32px;
  position: relative;
  padding: 15px;
  transition: all .5s;
}
.screen{
  width: 100%;
  position: relative;
  z-index: 2;
}

.top-screen{
  height: 45px;
}

.camera{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin: auto;
  background: #ffffff; 
  background: -moz-linear-gradient(-45deg, #ffffff 0%, #f1f1f1 50%, #e1e1e1 51%, #f6f6f6 100%); 
  background: -webkit-linear-gradient(-45deg, #ffffff 0%,#f1f1f1 50%,#e1e1e1 51%,#f6f6f6 100%); 
  background: linear-gradient(135deg, #ffffff 0%,#f1f1f1 50%,#e1e1e1 51%,#f6f6f6 100%); 
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f6f6f6',GradientType=1 ); 
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  border: .1vw solid #929292;
  display: block;
  margin-bottom: 5px;
}

.microphone{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin: auto;
  background: #ffffff; 
  background: -moz-linear-gradient(-45deg, #ffffff 0%, #f1f1f1 50%, #e1e1e1 51%, #f6f6f6 100%); 
  background: -webkit-linear-gradient(-45deg, #ffffff 0%,#f1f1f1 50%,#e1e1e1 51%,#f6f6f6 100%); 
  background: linear-gradient(135deg, #ffffff 0%,#f1f1f1 50%,#e1e1e1 51%,#f6f6f6 100%); 
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f6f6f6',GradientType=1 ); 
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  border: 1px solid #929292;
  display: inline-block;
}

.microphone-bar{
  width: 60px;
  height: 8px;
  border-radius: 5px;
  margin: auto;
  background: #ffffff; 
  background: -moz-linear-gradient(-45deg, #ffffff 0%, #f1f1f1 50%, #e1e1e1 51%, #f6f6f6 100%); 
  background: -webkit-linear-gradient(-45deg, #ffffff 0%,#f1f1f1 50%,#e1e1e1 51%,#f6f6f6 100%); 
  background: linear-gradient(135deg, #ffffff 0%,#f1f1f1 50%,#e1e1e1 51%,#f6f6f6 100%); 
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f6f6f6',GradientType=1 ); 
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  border: 1px solid #929292;
  display: inline-block;
}

.middle-screen{
  position: relative;
      overflow: hidden;
  height: 350px;
  width: 220px;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  border: 2px solid #929292;
  border-radius: 3px;
  background-color: #252525;
  overflow-y: auto;
  text-align: left;
  padding: 40px;
  display: table-cell;
  vertical-align: middle;
}

.interieur{
  height: calc(100% - 38px);
}

.bottom-screen > button{
  padding: 18px;
  border-radius: 50%;
  outline: none;
  background: #ffffff; 
  background: -moz-linear-gradient(-45deg, #ffffff 0%, #f1f1f1 50%, #e1e1e1 51%, #f6f6f6 100%); 
  background: -webkit-linear-gradient(-45deg, #ffffff 0%,#f1f1f1 50%,#e1e1e1 51%,#f6f6f6 100%); 
  background: linear-gradient(135deg, #ffffff 0%,#f1f1f1 50%,#e1e1e1 51%,#f6f6f6 100%); 
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f6f6f6',GradientType=1 ); 
}

.exterieur{
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
}

.button-shutdown{
  width: 40px;
  height: 3px;
  float: right;
  background-color: #F5F6F8;
  margin-right: 34px;
  transform: translateY(-7px);
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
}

.button-vol-mute{
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
  background-color: #F5F6F8;
  height: 34px;
  width: 4px;
  transform: translateX(-7px) translateY(59px);
}

.button-vol-plus{
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
  background-color: #F5F6F8;
  height: 24px;
  width: 4px;
  transform: translateX(-7px) translateY(79px);
}

.button-vol-moins{
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
  background-color: #F5F6F8;
  height: 24px;
  width: 4px;
  transform: translateX(-7px) translateY(90px);
}

.battery{
  background-color: #383C3C;
  height: 50px;
  width: 100%;
  border: 6px solid #383C3C;
  position: relative;
  transform: translateX(-5px);
  transition: all .5s;
}

.battery > span{
  display: block;
  background-color: #383C3C;
  width: 4px;
  height: 60%;
  top: 20%;
  position: absolute;
  right: -10px;
}
.battery > div{
  background-color: transparent;
  width: 0%;
  height: 100%;
  position: relative;
}

@keyframes charge {
  0% {
    width: 0%;
    background-color: #E45E5A;
  }
  20%{
    width: 20%;
    background-color: #E45E5A;
  }
  24%{
    width: 24%;
    background-color: #02EF55;
  }
  100% {
    width: 100%;
    background-color: #02EF55;
  }
}

@keyframes decharge {
 .........完整代码请登录后点击上方下载按钮下载查看

网友评论0