moment实现一个数字时钟及数字跳动动画效果代码
代码语言:html
所属分类:动画
代码描述:moment实现一个数字时钟及数字跳动动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<html>
<head>
<style>
body {
padding: 2em;
background-color: #555;
}
.inputStyle {
display: block;
width: 60%;
padding: 0.5em 1em;
margin: 1em auto;
border: none;
font-family: "consolas", monospace;
font-size: 1.2em;
}
.section-title {
font-size: 2.5em;
color: #eee;
font-family: "Open Sans", Arial, sans-serif;
font-weight: 300;
text-align: center;
margin: 1em 0;
}
.attrib {
background-color: #888;
padding: 10px;
text-align: center;
font-family: "Consolas";
}
.attrib .credits a {
color: #7dffee;
}
/* section - digits time */
.times-digit {
text-align: center;
}
.hours, .minutes, .seconds {
display: inline-block;
}
.times-digit .digit,
.times-digit .colon {
display: inline-block;
}
/* section - digits go random */
.digits-go-random .digit {
float: left;
transform: scale(0.5);
transition: 0.2 all ease-in-out;
}
.digits-go-random .digit:hover {
transform: scale(1);
transition: 0.2 all ease-in-out;
}
/* Digits CSS */
.digit, .colon {
position: relative;
margin: 2em 1em;
width: 120px;
height: 240px;
}
.colon {
width: 80px;
}
.colon .circle {
position: absolute;
width: 40px;
height: 40px;
background-color: #fff;
border-radius: 50%;
box-shadow: 0 12px 0px -1px rgba(0,0,0,0.45);
left: 50%;
margin-left: -20px;
}
.colon .circle-1 {
top: 50%;
margin-top: -80px;
}
.colon .circle-2 {
top: 50%;
margin-top: 40px;
}
.digit .line {
background-color: #fff;
position: absolute;
border-radius: 5px;
box-shadow: 0 12px 0px -1px rgba(0,0,0,0.45);
transition: 0.2s all ease-in-out;
}
.line-1, .line-2, .line-5 {
width: 120px;
height: 30px;
}
.line-3, .line-4, .line-6, .line-7 {
width: 30px;
height: 120px;
}
.line-1 {
top: 0;
left: 0;
right: 0;
}
.line-2 {
bottom: 0;
left: 0;
right: 0;
}
.line-3 {
left: 0;
}
.line-4 {
right: 0;
}
.line-5 {
top: 105px;
}
.l.........完整代码请登录后点击上方下载按钮下载查看
网友评论0