jquery实现带数字时间的时钟走动效果代码

代码语言:html

所属分类:布局界面

代码描述:jquery实现带数字时间的时钟走动效果代码

代码标签: 数字 间的 时钟 走动 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />

</head>
<style>
    body,div,p {
        font-family: 'Microsoft Yahei';
        font-size: 14px;
    }
    .box {
        width: 400px;
        height: 400px;
        border: 10px solid #8bf2f1;
        margin: 30px auto;
        border-radius: 50%;
        box-shadow: 0px 0px 20px 3px #444 inset;
        position: relative;
    }
    /*原点*/
    .origin {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: #ff0000;
        top: 190px;
        left: 190px;
        position: absolute;
    }
    /* 指针 */
    .clock_line {
        position: absolute;
        position: absolute;
        z-index: 20;
    }
    .hour_line {
        width: 100px;
        height: 4px;
        top: 198px;
        left: 200px;
        background-color: #000;
        border-radius: 2px;
        transform-origin: 0 50%;
        box-shadow: 1px -3px 8px 3px #aaa;
    }
    .minute_line {
        width: 130px;
        height: 2px;
        top: 199px;
        left: 190px;
        background-color: #000;
        transform-origin: 7.692% 50%;
        box-shadow: 1px -3px 8px 1px #aaa;
    }
    .second_line {
        width: 170px;
        height: 1px;
        top: 199.5px;
        left: 180px;
        background-color: #f60;
        transform-origin: 11.765% 50%;
        box-shadow: 1px -3px 7px 1px #bbb;
    }

    .dot_box {
        width: inherit;
        height: inherit;
    }
    /*时钟数*/
    .dot {
        width: 40px;
        height: 40px;
        line-height: 40px;
        text-align: center;
        font-size: 22px;
        position: absolute;
    }
    .clock-scale {
        width: 195px;
        height: 2px;
        transform-origin: 0% 50%;
        z-index: 7;
        position: absolute;
        top: 199px;
        left: 200px;
    }
    .scale-show {
        width: 12px;
        height: 2px;
        background-color: #555;
        float: left;
    }
    .scale-hidden {
        width: 183px;
        height: 2px;
        float: left;
    }
    /*日期*/
    .date_info {
        width: 160px;
        height: 28px;
        line-height: 28px;
        text-align: center;
        position: absolute;
        top: 230px;
        left: 120px;
        z-index: 11;
        color: #555;
        font-weight: bold;
    }
    .time_info {
        width: 110px;
        height: 35px;
        line-height: 35px;
        text-align: center;
        position: absolute;
        top: 270px;
        left: 150px;
        z-index: 11;
        color: #555;
        background: #253e3e;
    }
    .time {
        width: 35px;
        height: 35px;
        float: left;
        color: #fff;
        font-size: 22px;
    }
    #minute_time {
        border-left: 1px solid #fff;
        border-right: 1px solid #fff;
    }
</style>
<body>
    <div style="text-align:center;clear:both;">
        <script src="/gg_bd_ad_720x90.js" type="text/javascript"></script>
        <script src="/follow.js" type="text/javascript"></script>
    </div>
    <div class="box" id="clock">
        <!-- 原点 -->
        <div class="origin"></div>
        <!-- 时钟数 -->
        <div class="dot_box">
            <div class="dot">
                6
            </div>
            <div class="dot">
                5
            </div>
            <div class="dot">
                4
            </div>
            <div class="dot">
                3
            </div>
            <div class="dot">
                2
            </div>
            <div class="dot">
                1
            </div>
            <div class="dot">
                12
            </div>
            <div class="dot">
                11
            </div>
            <div class="dot">
                10
            </div>
            <div class="dot">
                9
            </div>
            <div class="dot">
                8
            </div>
            <div class="dot">
                7
            </div>
        </div>
        <!-- 时、分、秒针 -->
        <div class="clock_line hour_line" id="hour_line"></div>
        <div class="clock_line minute_line" id="minute_line"></di.........完整代码请登录后点击上方下载按钮下载查看

网友评论0