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;
    width: 0;
    height: 1px;
    background-color: #98afaf;
    transition: all .4s ease;
}

.Type span:hover::before{
    width: 100%;
}

.TimeFormat{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 110px;
}

.Type .active{
    color: aquamarine;    
}

.Type .active::after{
    content: "\f053";
    font-weight: 900;
    font-family: "Font Awesome 5 Free";
    position: absolute;
    top: 50%;
    right: -20px;
    transform: translate(-50%,-50%);
}

.Type .active::before{
    width: 100%;
}

.TimeOptions i{
    margin: 10px 3px;
    position: relative;
    cursor: pointer;
}

.TimeOptions i::after {
    display: block;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    background: #fff;
    color: #646464;
    content: attr(data-title);
    font-size: 12px;
    padding: 3px 11px;
    top: -45%;
    left: 50%;
    white-space: nowrap;
    transform: translate(-50%,-50%) scale3d(.2,.2,1);
    transition: all .35s ease-in-out;
    line-height: initial;
    border-radius: 100px;
    z-index: 20;
}

.control{
    display: none;
    color: #F0FFFF;
    position: relative;
    margin-left: 10px
}

.control span{
    position: relative;
    cursor: pointer;
    text-align: center;
    display: none;
    margin-bottom: 20px;
}

.control .Pause{
    display: none;
}
.control span.active{
    display: block;
}

.control span i{
    margin-bottom: 5px;
}

.TimeOptions i:hover::after {
    opacity: 1;
    transform: translate(-50%,-50%) scale3d(1,1,1);
}

.StopWatch .Type,.StopWatch .Formats,.Alarm .Type,.Alarm .Formats{
    display: none;
}

.StopWatch .control,.Alarm .control{
    display: block;
}

.ClockHolder::before{
    content: "";
    position: absolute;
    width: 110%;
    height: 10px;
    background-color: #00000077;
    bottom: -25px;
    left: -5%;
    border-radius: 100%;
    filter: blur(5px);
}

.AlarmInput{
    display: none;
}

.AlarmInput input{
    height: 100px;
    font-size: 100px;
    max-width: 400px;
    font-family: 'Orbitron', sans-serif;
    background-color: #1b252a;
    border: none;
    padding: 5px 20px;
    color: azure;
    letter-spacing: 5px;
    position: relative;
}

.AlarmInput input:focus{
    border: 1px solid #fff;
}

.Alarm .AlarmInput{
    display: block;
}
.Alarm .AlarmInput.DisNone{
    display: none;
}

.AlarmInput input::-webkit-input-placeholder { /* Chrome/Opera/Safari */
    font-size: 30px;
}
.AlarmInput input::-moz-placeholder { /* Firefox 19+ */
    font-size: 30px;
}
.AlarmInput input:-ms-input-placeholder { /* IE 10+ */
    font-size: 30px;
}
.AlarmInput input:-moz-placeholder { /* Firefox 18- */
    font-size: 30px;
}

.show1 .d1{
    animation: From01 .35s ease 1 forwards;
}
.show1 .d2{
    animation: From02 .35s ease 1 forwards;
}
.show1 .d3{
    top: 0;
    left: calc( 100% - 7px );
    transform: rotate(180deg);
}
.show1 .d4{
    bottom: 0;
    left: calc(100% - 7px);
    transform: rotate(180deg);
}

.show1 .d5{
    animation: From05 .35s ease 1 forwards;
}
.show1 .d6{
    animation: From06 .35s ease 1 forwards;
}
.show1 .d7{
    opacity: 0;
}

.show2 .d1{
    top: 0;
    left: calc( 100% - 7px );
    transform: rotate(180deg);
}
.show2 .d2{
    animation: From12 .35s ease 1 forwards;
}
.show2 .d3{
    top: 0;
    left: calc( 100% - 7px );
    transform: rotate(180deg);
}
.show2 .d4{
    animation: From16 .35s ease 1 forwards;
}
.show2 .d5{
    animation: From15 .35s ease 1 forwards;
}
.show2 .d6{
    animation: From16 .35s ease 1 forwards;
}
.show2 .d7{
    opacity: 1;
    transition: opacity .35s ease;
}

@keyframes From12{
    from{
        bottom: 0;
        left: calc(100% - 7px);
        transform: rotate(180deg);
    }
    to{
        bottom: 0;
        left: 0;
    }
}
@keyframes From15{
    from{
        top: 0;
        left: calc(100% - 7px);
        transform: rotate(180deg);
    }
    to{
        top: -22px;
        left: 7px;
        transform: rotate(90deg) translate(-50%,-50%);
    }
}
@keyframes From16{
    from{
        bottom: 0;
        left: calc(100% - 7px);
        transform: rotate(180deg) translate(0,0);
    }
    to{
        bottom: -22px;
        left: 7px;
        transform: rotate(-90deg) translate(-50%,50%);
    }
}
.show3 .d1{
    top: 0;
    left: calc( 100% - 7px );
    transform: rotate(180deg);
}
.show3 .d2{
    animation: From22 .35s ease 1 forwards;
}
.show3 .d3{
    top: 0;
    right: 0;
    transform: rotate(180deg);
}
.show3 .d4{
    animation: From24 .35s ease 1 forwards;
}

.show3 .d5{
    top: -22px;
    left: 7px;
    transform: rotate(90deg) translate(-50%,-50%);
}
.show3 .d6{
    animation: From24 .35s ease 1 forwards;
}
.show3 .d7{
    opacity: 1;
    transition: opacity .35s ease;
}

@keyframes From22{
    from{
        bottom: 0;
        left: 0;
    }
    to{
        bottom: -22px;
        left: 7px;
        transform: rotate(-90deg) translate(-50%,50%);
    }
}
@keyframes From24{
    from{
        bottom: -22px;
        left: 7px;
        transform: rotate(-90deg) translate(-50%,50%);
    }
    to{
        bottom: 0;
        right: 0;
        transform: rotate(180deg) translate(0,0);
    }
}
.show4 .d1{
    animation: From31 .35s ease 1 forwards;
}
.show4 .d2{
    top: 0;
    right: 0;
    transform: rotate(180deg);
}
.show4 .d3{
    top: 0;
    right: 0;
    transform: rotate(180deg);
}
.show4 .d4{
    bottom: 0;
    right: 0;
    transform: rotate(180deg);
}

.show4 .d5{
    animation: From31 .35s ease 1 forwards;
}
.show4 .d6{
    animation: From36 .35s ease 1 forwards;
}
.show4 .d7{
    opacity: 1;
    transition: opacity .35s ease;
}

@keyframes From31{
    from{
        top: -22px;
        left: 7px;
        transform: rotate(90deg) translate(-50%,-50%);
    }
    to{
        top: 0;
        left: 0;
    }
}
@keyframes From32{
    from{
        bottom: 0;
        left: 0;
    }
    to{
        bottom: -22px;
        left: 7px;
        transform: rotate(-90deg) translate(-50%,50%);
    }
}
@keyframes From36{
    from{
        bottom: -22px;
        left: 7px;
        transform: rotate(-90deg) translate(-50%,50%);
    }
    to{
        bottom: 0;
        right: 0;
        transform: rotate(180deg) translate(0,0);
    }
}
.show5 .d1{
    top: 0;
    left: 0;
}
.show5 .d2{
    bottom: 0;
    right: 0;
    transform: rotate(180deg);
}
.show5 .d3{
    animation: From43 .35s ease 1 forwards;
}
.show5 .d4{
    bottom: 0;
    right: 0;
    transform: rotate(180deg);
}

.show5 .d5{
    animation: From43 .35s ease 1 forwards;
}
.show5 .d6{
    animation: From46 .35s ease 1 forwards;
}
.show5 .d7{
    opacity: 1;
    transition: opacity .35s ease;
}

@keyframes From43{
    from{
        top: 0;
        right: 0;
        transform: rotate(180deg) translate(0,0);
    }
    to{
        top: -22px;
        left: 7px;
        transform: rotate(90deg) translate(-50%,-50%);
    }
}
@keyframes From42{
    from{
        bottom: 0;
        left: 0;
    }
    to{
        bottom: -22px;
        left: 7px;
        transform: rotate(-90deg) translate(-50%,50%);
    }
}
@keyframes From46{
    from{
        bottom: 0;
        right: 0;
        transform: rotate(180deg) translate(0,0);
    }
    to{
        bottom: -22px;
        left: 7px;
        transform: rotate(-90deg) translate(-50%,50%);
    }
}
.show6 .d1{
    top: 0;
    left: 0;
}
.show6 .d2{
    animation: From52 .35s ease 1 forwards;
}
.show6 .d3{
    bottom: 0;
    right: 0;
    transform: rotate(180deg);
}
.show6 .d4{
    bottom: 0;
    right: 0;
    transform: rotate(180deg);
}

.show6 .d5{
    top: -22px;
    left: 7px;
    transform: rotate(90deg) translate(-50%,-50%);
}
.show6 .d6{
    bottom: -22px;
    left: 7px;
    transform: rotate(-90deg) translate(-50%,50%);
}
.show6 .d7{
    opacity: 1;
    transition: opacity .35s ease;
}

@keyframes From52{
    from{
        bottom: -22px;
        left: 7px;
        transform: rotate(-90deg) translate(-50%,50%);
    }
    to{
        bottom: 0;
        left: 0;
    }
}
.show7 .d1{
    animation: From61 .35s ease 1 forwards;
}
.show7 .d2{
    animation: From62 .35s ease 1 forwards;
}
.show7 .d3{
    animation: From63 .35s ease 1 forwards;
}
.show7 .d4{
    bottom: 0;
    right: 0;
    transform: rotate(180deg);
}

.show7 .d5{
    top: -22px;
    left: 7px;
    transform: rotate(90deg) translate(-50%,-50%);
}
.show7 .d6{
    animation: From66 .35s ease 1 forwards;
}
.show7 .d7{
    opacity: 0;
    transition: opacity .35s ease;
}

@keyframes From61{
    from{
        top: 0;
        left: 0;
    }
    to{
        top: 0;
        right: 0;
        transform: rotate(180deg);
    }
}
@keyframes From63{
    from{
        top: -22px;
        left: 7px;
        transform: rotate(90deg) translate(-50%,-50%);
    }
    to{
        top: 0;
        right: 0;
        transform: rotate(180deg);
    }
}
@keyframes From62{
    from{
        bottom: 0;
        left: 0;
    }
    to{
        bottom: 0;
        right: 0;
        transform: rotate(180deg);
    }
}

@keyframes From66{
    from{
        bottom: -22px;
        left: 7px;
        transform: rotate(-90deg) translate(-50%,50%);
    }
    to{
        bottom: 0;
        right: 0;
        transform: rotate(180deg);
    }
}
.show8 .d1{
    animation: From71 .35s ease 1 forwards;
}
.show8 .d2{
    animation: From72 .35s ease 1 forwards;
}
.show8 .d3{
    top: 0;
    right: 0;
    transform: rotate(180deg);
}
.show8 .d4{
    bottom: 0;
    right: 0;
    transform: rotate(180deg);
}

.show8 .d5{
    top: -22px;
    left: 7px;
    transform: rotate(90deg) translate(-50%,-50%);
}
.show8 .d6{
    animation: From76 .35s ease 1 forwards;
}
.show8 .d7{
    opacity: 1;
    transition: opacity .35s ease;
}

@keyframes From71{
    from{
        top: -22px;
        left: 7px;
        transform: rotate(90deg) translate(-50%,-50%);
    }
    to{
        top: 0;
        left: 0;
    }
}
@keyframes From72{
    from{
        bottom: 0;
        right: 0;
        transform: rotate(180deg);
    }
    t.........完整代码请登录后点击上方下载按钮下载查看

网友评论0