首頁 >web前端 >js教程 >js時鐘翻牌效果實現程式碼分享_javascript技巧

js時鐘翻牌效果實現程式碼分享_javascript技巧

WBOY
WBOY原創
2016-05-16 15:44:531581瀏覽

先給大家上運行效果圖,看看是不是特別棒!

這張是小編抓拍時鐘翻牌時的效果圖:

為大家分享的JavaScript時鐘翻牌效果代碼如下

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Create an Animated Flip Down Clock</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div id="wrapper">

 <div id="back">
  <div id="upperHalfBack">
  <img src="spacer.png" /><img id="hoursUpBack" src="Single/Up/AM/0.png"/>
  <img id="minutesUpLeftBack" src="Double/Up/Left/0.png" class="asd" /><img id="minutesUpRightBack" src="Double/Up/Right/0.png"/>
  <img id="secondsUpLeftBack" src="Double/Up/Left/0.png" /><img id="secondsUpRightBack" src="Double/Up/Right/0.png"/>
  </div>
  <div id="lowerHalfBack">
  <img src="spacer.png" /><img id="hoursDownBack" src="Single/Down/AM/0.png" />
  <img id="minutesDownLeftBack" src="Double/Down/Left/0.png" /><img id="minutesDownRightBack" src="Double/Down/Right/0.png" />
  <img id="secondsDownLeftBack" src="Double/Down/Left/0.png" /><img id="secondsDownRightBack" src="Double/Down/Right/0.png" />
  </div>
 </div>
 
 
 <div id="front">
  <div id="upperHalf">
  <img src="spacer.png" /><img id="hoursUp" src="Single/Up/AM/0.png"/>
  <img id="minutesUpLeft" src="Double/Up/Left/0.png" /><img id="minutesUpRight" src="Double/Up/Right/0.png"/>
  <img id="secondsUpLeft" src="Double/Up/Left/0.png" /><img id="secondsUpRight" src="Double/Up/Right/0.png"/>
  </div>
  <div id="lowerHalf">
  <img src="spacer.png" /><img id="hoursDown" src="Single/Down/AM/0.png"/>
  <img id="minutesDownLeft" src="Double/Down/Left/0.png" /><img id="minutesDownRight" src="Double/Down/Right/0.png" />
  <img id="secondsDownLeft" src="Double/Down/Left/0.png" /><img id="secondsDownRight" src="Double/Down/Right/0.png" />
  </div>
 </div> 
</div>



</body>
<script src="mootools.js" type="text/javascript"></script>
<script src="animate.js" type="text/javascript"></script>
</html>

以上就是為大家分享的JavaScript時鐘翻牌程式碼,希望大家可以喜歡。

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn