Blogger Information
Blog 2
fans 0
comment 0
visits 1705
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
2019年农历春节倒计时-2019年1月21日22点25分
天腾的博客
Original
1013 people have browsed it

实例

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
 
    <title>春节倒计时</title>
    <style type="text/css">
         .a{width: 1000px;
              height:800px;
              margin: 0 auto;
              margin-top: 30px;
                background-image:url(images/20190121.jpg);
               }
    
    </style>

    <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
    <script type="text/javascript">
           $(function(){
                    function Ro(){
                        var d=Date.parse("Feb 05,2019");
                        var date=new Date();
                        var dd=date.getTime();
                        var rd=Math.floor((d-dd)/1000);
                        var days=Math.floor(rd/86400);
                        var hours=Math.floor(rd%86400/3600);
                        var minus=Math.floor(rd%3600/60);
                        var secos=Math.floor(rd%60);
                        $("span").text(days+"天"+hours+"小时"+minus+"分钟"+secos+"秒")

                    }
                    setInterval(Ro,1000);
             
           })
    </script>
    <style type="text/css">
        .box{margin: 0 auto;margin-top: 20px;text-align: center;}
        .box{width: 280px;height: 280px;line-height: 140px;border-radius: 50%;}
        .text{text-shadow: 1px 2px #5b149e;}
    </style>
</head>
<body>
        
         
        <div class='a'>
                <div class="box text">2019年农历春节倒计时:
                        <div>  <span ></span></div>
                </div>
         </div>
<script>
    $(function(){
        console.log($('.box').css('height'))
        $('.box').css('background','red')
        $('.box').css({'font-weight':'bold','font-size':'19px','color':'#fff'})
        $('.box').addClass('text')
    })

</script>
    
</body>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例


Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments