纯css模拟手机充电动画效果
代码语言:html
所属分类:动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
<style>
* {
box-sizing: border-box;
}
body {
overflow: hidden;
display: flex;
height: 100vh;
margin: 0;
padding: 0;
background-color: black;
}
.reset {
opacity: 0;
position: absolute;
bottom: 30px;
right: 30px;
animation: reset 13s forwards;
background: black;
border: 0 none;
}
.reset input {
background: black;
color: white;
border: 0 none;
}
.phone {
--width: 320px;
--height: 490px;
margin: auto auto 0 auto;
width: var(--width);
height: var(--height);
position: relative;
}
.text {
font-family: sans-serif;
color: darkgray;
position: absolute;
z-index: 2;
left: 0;
right: 0;
text-align: center;
top: 180px;
font-size: 17px;
}
.status {
width: 190px;
justify-content: center;
display: flex;
align-items: center;
color: white;
position: absolute;
top: 125px;
left: 0;
right: 0;
margin: auto;
z-index: 3;
}
.progress {
font-size: 3em;
font-family: sans-serif;
margin-left: 8px;
display: flex;
color: transparent;
}
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0