jquery+css实现炫酷数字时钟星期时间代码
代码语言:html
所属分类:其他
代码描述:jquery+css实现炫酷数字时钟星期时间代码
代码标签: jquery css 炫酷 数字 时钟 星期 时间 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/all.5.6.1.css">
<style>
/* Css Reset */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
/* Css Code */
body{
background-color: #7B1FA2;
font-family: 'Text Me One', sans-serif;
}
.container{
width: 90%;
max-width: 1400px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
display: flex;
justify-content: center;
}
.ClockHolder{
width: 500px;
background-color: #1b252a;
padding: 30px 50px;
border-radius: 15px;
border: 3px solid #0277BD;
position: relative;
}
.ClockHolder::after{
content: " ";
position: absolute;
bottom: -15px;
left: 50%;
width: 70%;
height: 15px;
background-color: #0277bd;
transform: translate(-50%,0);
border-radius: 3px 3px 8px 8px;
}
.ClockHolder::before{
}
.WeekDays{
display: flex;
width: 100%;
justify-content: space-between;
text-transform: uppercase;
color: #646c72;
cursor: default;
}
.WeekDays .active{
color: aliceblue;
position: relative;
}
.WeekDays .active::after{
content: "";
position: absolute;
bottom: -3px;
left: 0;
height: 2px;
width: 100%;
background-color: aliceblue;
}
.Numbers,
.TimeHolder{
display: flex;
justify-content: space-around;
width: 100%;
padding: 20px 0 5px;
align-items: flex-end;
}
.NumberHolder{
position: relative;
width: 60px;
height: 95px;
}
.d1 , .d2 , .d3 , .d4 , .d5 , .d6 , .d7{
width: 8px;
height: 40px;
background-color: azure;
position: absolute;
}
.d1::after , .d2::after , .d3::after , .d4::after , .d5::after , .d6::after , .d7::after{
content: "";
position: absolute;
background-color: azure;
width: 7px;
height: 7px;
top: -7px;
left: 0;
clip-path: polygon(0 0, 0% 100%, 100% 100%);
}
.d1::before , .d2::before , .d3::before , .d4::before , .d5::before , .d6::before , .d7::before{
content: "";
position: absolute;
background-color: azure;
width: 7px;
height: 7px;
bottom: -7px;
left: 0;
clip-path: polygon(0 0, 100% 0, 0 100%);
}
.d7{
top: 50%;
left: 50%;
transform: translate(-50%,-50%) rotate(90deg);
}
.d7::before{
clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.d7::after{
clip-path: polygon(0 100%, 100% 100%, 50% 0);
}
@keyframes From01{
from{
top: 0;
left: 0;
}
to{
top: 0;
left: calc( 100% - 7px );
transform: rotate(180deg);
}
}
@keyframes From02{
from{
bottom: 0;
left: 0;
}
to{
bottom: 0;
left: calc(100% - 7px);
transform: rotate(180deg);
}
}
@keyframes From05{
from{
top: -22px;
left: 7px;
transform: rotate(90deg) translate(-50%,-50%);
}
to{
top: 0;
left: calc(100% - 7px);
transform: rotate(180deg);
}
}
@keyframes From06{
from{
bottom: -22px;
left: 7px;
transform: rotate(-90deg) translate(-50%,50%);
}
to{
bottom: 0;
left: calc(100% - 7px);
transform: rotate(180deg) translate(0,0);
}
}
.TimeOptions{
display: flex;
flex-direction: column;
color: aliceblue;
}
.Numbers>span{
font-size: 100px;
color: aliceblue;
}
.NumberHolder{
margin: 0 7px;
}
.Formats span{
display: none;
color: aliceblue;
font-size: 2em;
cursor: default;
}
.Formats .active{
display: block;
}
.Type{
display: flex;
flex-direction: column;
color: #98afaf;
}
.Type span{
position: relative;
margin: 2px 0;
cursor: pointer;
}
.Type span::before{
content: "";
position: absolute;
bottom: -1px;
left: 0;
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0