当前位置:   article > 正文

JS特效第148弹:html5 css3圆形进度条倒计时页面跳转代码

JS特效第148弹:html5 css3圆形进度条倒计时页面跳转代码

         基于html5 css3圆形进度条倒计时页面跳转代码 ,先来看看效果:

        一部分关键的代码如下:

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>html5 css3圆形进度条倒计时页面跳转代码_js代码</title>
  6. <meta name="keywords" content="倒计时,跳转,html5倒计时,html5进度条" />
  7. <meta name="description" content="html5 css3圆形进度条倒计时页面跳转代码。" />
  8. <style>
  9. body {
  10. margin: 0;
  11. padding: 0;
  12. background: #E6EAEB;
  13. font-family: Arial, '微软雅黑', '宋体', sans-serif
  14. }
  15. .alert-box {
  16. display: none;
  17. position: relative;
  18. margin: 96px auto 0;
  19. padding: 180px 85px 22px;
  20. border-radius: 10px 10px 0 0;
  21. background: #FFF;
  22. box-shadow: 5px 9px 17px rgba(102,102,102,0.75);
  23. width: 286px;
  24. color: #FFF;
  25. text-align: center
  26. }
  27. .alert-box p {
  28. margin: 0
  29. }
  30. .alert-circle {
  31. position: absolute;
  32. top: -50px;
  33. left: 111px
  34. }
  35. .alert-sec-circle {
  36. stroke-dashoffset: 0;
  37. stroke-dasharray: 735;
  38. transition: stroke-dashoffset 1s linear
  39. }
  40. .alert-sec-text {
  41. position: absolute;
  42. top: 11px;
  43. left: 190px;
  44. width: 76px;
  45. color: #000;
  46. font-size: 68px
  47. }
  48. .alert-sec-unit {
  49. font-size: 34px
  50. }
  51. .alert-body {
  52. margin: 35px 0
  53. }
  54. .alert-head {
  55. color: #242424;
  56. font-size: 28px
  57. }
  58. .alert-concent {
  59. margin: 25px 0 14px;
  60. color: #7B7B7B;
  61. font-size: 18px
  62. }
  63. .alert-concent p {
  64. line-height: 27px
  65. }
  66. .alert-btn {
  67. display: block;
  68. border-radius: 10px;
  69. background-color: #4AB0F7;
  70. height: 55px;
  71. line-height: 55px;
  72. width: 286px;
  73. color: #FFF;
  74. font-size: 20px;
  75. text-decoration: none;
  76. letter-spacing: 2px
  77. }
  78. .alert-btn:hover {
  79. background-color: #6BC2FF
  80. }
  81. .alert-footer {
  82. margin: 0 auto;
  83. height: 42px;
  84. width: 120px
  85. }
  86. .alert-footer-icon {
  87. float: left
  88. }
  89. .alert-footer-text {
  90. float: left;
  91. border-left: 2px solid #EEE;
  92. padding: 3px 0 0 5px;
  93. height: 40px;
  94. color: #0B85CC;
  95. font-size: 12px;
  96. text-align: left
  97. }
  98. .alert-footer-text p {
  99. color: #7A7A7A;
  100. font-size: 22px;
  101. line-height: 18px
  102. }
  103. </style>
  104. </head>
  105. <body class="ie8">
  106. <div id="js-alert-box" class="alert-box">
  107. <svg class="alert-circle" width="234" height="234">
  108. <circle cx="117" cy="117" r="108" fill="#FFF" stroke="#43AEFA" stroke-width="17"></circle>
  109. <circle id="js-sec-circle" class="alert-sec-circle" cx="117" cy="117" r="108" fill="transparent" stroke="#F4F1F1" stroke-width="18" transform="rotate(-90 117 117)"></circle>
  110. <text class="alert-sec-unit" x="82" y="172" fill="#BDBDBD"></text>
  111. </svg>
  112. <div id="js-sec-text" class="alert-sec-text"></div>
  113. <div class="alert-body">
  114. <div id="js-alert-head" class="alert-head"></div>
  115. <div class="alert-concent">
  116. <p>花个3分钟创建属于您的个人帐号</p>
  117. <p>您将在我们的网站享受更多</p>
  118. </div>
  119. <a id="js-alert-btn" class="alert-btn" href="http://www.jsdaima.com">立即前往注册</a>
  120. </div>
  121. <div class="alert-footer clearfix">
  122. <svg width="46px" height="42px" class="alert-footer-icon">
  123. <circle fill-rule="evenodd" clip-rule="evenodd" fill="#7B7B7B" stroke="#DEDFE0" stroke-width="2" stroke-miterlimit="10" cx="21.917" cy="21.25" r="17"/>
  124. <path fill="#FFF" d="M22.907,27.83h-1.98l0.3-2.92c-0.37-0.22-0.61-0.63-0.61-1.1c0-0.71,0.58-1.29,1.3-1.29s1.3,0.58,1.3,1.29 c0,0.47-0.24,0.88-0.61,1.1L22.907,27.83z M18.327,17.51c0-1.98,1.61-3.59,3.59-3.59s3.59,1.61,3.59,3.59v2.59h-7.18V17.51z M27.687,20.1v-2.59c0-3.18-2.59-5.76-5.77-5.76s-5.76,2.58-5.76,5.76v2.59h-1.24v10.65h14V20.1H27.687z"/>
  125. <circle fill-rule="evenodd" clip-rule="evenodd" fill="#FEFEFE" cx="35.417" cy="10.75" r="6.5"/>
  126. <polygon fill="#7B7B7B" stroke="#7B7B7B" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="35.417,12.16 32.797,9.03 31.917,10.07 35.417,14.25 42.917,5.29 42.037,4.25 "/>
  127. </svg>
  128. <div class="alert-footer-text"><p>secure</p>安全加密 </div>
  129. </div>
  130. </div>
  131. <script type="text/javascript">
  132. function alertSet(e) {
  133. document.getElementById("js-alert-box").style.display = "block",
  134. document.getElementById("js-alert-head").innerHTML = e;
  135. var t = 10,
  136. n = document.getElementById("js-sec-circle");
  137. document.getElementById("js-sec-text").innerHTML = t,
  138. setInterval(function() {
  139. if (0 == t){
  140. location.href="http://www.jsdaima.com";
  141. }else {
  142. t -= 1,
  143. document.getElementById("js-sec-text").innerHTML = t;
  144. var e = Math.round(t / 10 * 735);
  145. n.style.strokeDashoffset = e - 735
  146. }
  147. },
  148. 970);
  149. }
  150. </script>
  151. <script>alertSet('前往会员注册');</script>
  152. </body>
  153. </html>
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家小花儿/article/detail/90960
推荐阅读
相关标签
  

闽ICP备14008679号