纯css实现手表时间走动动画效果
代码语言:html
所属分类:动画
代码描述:纯css实现手表时间走动动画效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
body {
font-size: 10px;
background-size: 500px;
background-position: 51% -6%;
}
@media (max-width: 599px) {
body {
font-size: 6px;
background: #fff;
}
}
body .watch {
width: 40em;
height: 69em;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
body .watch .band .top {
width: 26em;
height: 5.93em;
position: absolute;
background: transparent;
top: 27%;
left: 18%;
background-repeat: no-repeat;
}
body .watch .band .top:after {
content: '';
position: absolute;
top: -10em;
left: 50%;
transform: translate(-50%, 0);
width: 18em;
height: 15em;
background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 48%, transparent 54%) 50% 17.3%/16.6em 15em, linear-gradient(92deg, #fff 48%, transparent 54%) 0% 0%/1.7em 6.8em, linear-gradient(-92deg, #fff 48%, transparent 54%) 100% 0%/1.7em 6.8em, linear-gradient(#333 48%, #333 54%) 50% 17.3%/16.6em 15em;
background-repeat: no-repeat;
}
body .watch .band .top:before {
width: 26em;
height: 5.93em;
content: '';
background: linear-gradient(-97deg.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0