Css之自由落体

<!DOCTYPE html>  
< html  lang= "zh-cn">  
< head>  
    < meta  charset= "UTF-8">  
    < title>HTML5+CSS3练习</ title>  
   
</ head>  
< body>  
    < fieldset  style= "height:550px;">  
        < legend>自由落体</ legend>  
        北京时间:< span  class= "time"></ span>  
        < figure  class= "circle"></ figure>  
        < figure  class= "shadow"></ figure>  
        < style>  
           @keyframes  circle{  
            0%,100%{  
                 margin-top: 20 px;  
            }  
            2%{  
                 margin-top: 20 px;  
            }  
            98%{  
                 margin-top: 20 px;  
            }  
            48%{  
                 margin-top300 px;  
            }  
            52%{  
                 margin-top300 px;  
            }  
          }  
  
           .circle{  
             height: 200 px;  
             width: 200 px;  
             margin: 20 px  auto  0 px;  
             border-radius50 %;  
             positionrelative;  
             z-index10;  
             background-imageradial-gradient( circle  at  70 px  80 px, #39c, #000);  
             animation: circle  2 s  ease-in  infinite  alternate;  
          }  
  
           @keyframes  shadow{  
            0%,100%{  
                 height50 px;  
                 width50 px;  
                 margin-left-25 px;  
                 margin-top40 px;  
                 background-color: rgba( 0, 0, 0, 0.5);  
            }  
            2%{  
                 height50 px;  
                 width50 px;  
                 margin-left-25 px;  
                 margin-top40 px;  
                 background-color: rgba( 0, 0, 0, 0.5);  
            }  
            98%{  
                 height50 px;  
                 width50 px;  
                 margin-left-25 px;  
                 margin-top40 px;  
                 background-color: rgba( 0, 0, 0, 0.5);  
            }  
            48%{  
                 height170 px;  
                 width170 px;  
                 margin-left-85 px;  
                 margin-top-10 px;  
                 background-colorrgba( 0, 0, 0, 0.8);  
            }  
            52%{  
                 height170 px;  
                 width170 px;  
                 margin-left-85 px;  
                 margin-top-10 px;  
                 background-colorrgba( 0, 0, 0, 0.8);  
            }  
          }  
            
           .shadow{  
             transform-style: preserve-3d;  
             transform: rotate3d( 1, 0, 0, 80 deg);  
             animation:shadow  2 s  ease-in  infinite  alternate;  
             border-radius50 %;  
             positionabsolute;  
             top470 px;  
             left50 %;  
          }  
        </ style>  
        < script>  
         // $(function(){  
         //     time();  
         //     window.setInterval(time,1000);  
  
         // });          
         // var time=function(){  
         //     var date=new Date();  
         //     $(".time").text(date.toLocaleString());  
         // }  
        </ script>  
    </ fieldset>  
      
</ body>  
</ html
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值