CSS3 implementation of the Countdown applet, the interface is as follows:
The code is as follows:
<style> body,html{margin:0px;Height:100%; }Body{background:#000;Overflow:Hidden;}Div{width:200px;Height:200px;Border:5px #fff Solid;Border-radius:50%;position:relative;margin:0 Auto;text-align:Center;-webkit-transition:All . 5s ease-in. 1s;Top:50%; Left:50%;Margin-left:-100px;Margin-top:-100px; }Div>span{Color:#fff;Display:Inline-block;position:Absolute; Left:50%;Top:50%;font-size:145px;Line-height:74%;Font-weight:Bolder;font-family:Arial, Helvetica, Sans-serif;-webkit-transform:Translate ( -50%, -50%);width:100%; }. BigBang{-webkit-transform:Scale (Ten);Opacity:0; }</style>
HTML code:
< Div > < ID= "num"></span></ Div >
JS Code:
<script>functionDJs () {varObj=document.getelementbyid (' num '); varnum=Obj.innertext; Obj.innertext=num-1; if(num-1==0) {clearinterval (DS); Obj.parentElement.className= ' BigBang '; SetTimeout (function() {obj.parentElement.className= ' '; Obj.innerhtml= ' Time to '; Obj.style.fontSize= ' 58px '; Obj.parentElement.style.background= ' Red '; },600) } } //DJs (); varDs=setinterval (djs,1000);</script>
CSS3 Implementation Countdown