div+css实现时钟秒针数字闪现旋转动画效果代码
代码语言:html
所属分类:动画
代码描述:div+css实现时钟秒针数字闪现旋转动画效果代码
代码标签: div css 时钟 秒针 数字 闪现 旋转 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
body {
margin: 0;
}
* {
box-sizing: border-box;
}
.config {
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
.container {
width: 100vw;
height: 100vh;
background: linear-gradient(to bottom, #d5d5d5 25%, #e7e7e7 100%);
}
.wrapper {
width: 500px;
height: 500px;
background-color: #fdfffe;
border-radius: 50%;
box-shadow: 0 0 150px -100px, 0 0 200px -50px inset;
position: relative;
}
.round-wrapper {
animation: mainRound 60s linear forwards infinite;
transform-origin: 50px 250px;
position: absolute;
top: 0;
left: 200px;
}
@keyframes mainRound {
100% {
transform: rotate(360deg);
}
}
.round {
width: 125px;
height: 125px;
border-radius: 50%;
overflow: hidden;
position: relative;
opacity: 0.5;
}
.round .circle {
background-color: #000000;
border-radius: 50%;
height: 125px;
width: 125px;
animation: leave 1s forwards ease-out infinite;
transform-origin: 220px;
}
.round-back {
height: 100%;
width: 100%;
background-color: #326dcf;
border-radius: 50%;
position: absolute;
animation: shrinkCircle 1s forwards infinite;
}
@keyframes shrinkCircle {
40% {
transform: scale(1);
}
100% {
filter: hue-rotate(-400deg);
opacity: 0;
transform: scale(0);
}
}
@keyframes removeHidden {
0% {
overflow: hidden;
}
40% {
overflow: initial;
}
100% {
overflow: initial;
}
}
@keyframes leave {
0% {
transform: translate(-250px, 250px) scale(0.2) rotate(200deg);
}
100% {
background-color: #c3c3c3;
transform: translate(0, 0) rotate(0);.........完整代码请登录后点击上方下载按钮下载查看
网友评论0