• 图片时钟


    <!DOCTYPE html>
    <html>
    <head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <style>
    *{
    margin: 0;
    padding: 0;
    list-style: none;
    }
    ul li{
    24px;
    height:35px;
    overflow: hidden;
    float: left;
    font-size: 30px;
    position: relative;
    }
    ul li img{
    position: absolute;
    top:0;
    left:0;
    }
    </style>
    <script src="move1.js"></script>
    <script>
    function addZero(n){
    return n<10 ? '0'+n : ''+n;
    }
    window.onload=function(){
    var aImg=document.getElementsByTagName('img');
    function clock(){
    var oDate=new Date();
    var oHour=oDate.getHours();
    var oMin=oDate.getMinutes();
    var oSec=oDate.getSeconds();
    var str=addZero(oHour)+addZero(oMin)+addZero(oSec);
    for(var i=0;i<aImg.length;i++){
    move(aImg[i],{top:-str.charAt(i)*35})
    }
    }
    clock();
    setInterval(clock,1000);
    }
    </script>
    </head>
    <body>
    <ul>
    <li><img src="img/num.png" alt=""/></li>
    <li><img src="img/num.png" alt=""/></li>
    <li>:</li>
    <li><img src="img/num.png" alt=""/></li>
    <li><img src="img/num.png" alt=""/></li>
    <li>:</li>
    <li><img src="img/num.png" alt=""/></li>
    <li><img src="img/num.png" alt=""/></li>
    </ul>
    </body>
    </html>
  • 相关阅读:
    gdb php
    redis启动过程
    php protobuf 安装使用2
    php protobuf 安装使用
    服务治理
    base64编码
    redis-quicklist
    redis-ziplist
    redis-zset数据结构探索
    su root 出现 su: Authentication failure
  • 原文地址:https://www.cnblogs.com/HUANGRONG888/p/6075693.html
Copyright © 2020-2023  润新知