当前位置:Gxlcms > css > css3实现wifi信号逐渐增强的效果

css3实现wifi信号逐渐增强的效果

时间:2021-07-01 10:21:17 帮助过:327人阅读

本篇文章主要介绍了css3实现wifi信号逐渐增强效果实例,内容挺不错的,现在分享给大家,也给大家做个参考。

整理文档,搜刮出一个css3实现wifi信号逐渐增强效果实例的代码,稍微整理精简一下做下分享。

效果图

下面是实现代码:

  1. <!DOCTYPE html>
  2. <meta charset="utf-8">
  3. <html>
  4. <head>
  5. <title>wifi信号</title>
  6. <style type="text/css">
  7. *{
  8. margin: 0;
  9. padding: 0;
  10. }
  11. .box {
  12. width: 240px;
  13. height: 240px;
  14. box-sizing: border-box;
  15. position: relative;
  16. margin: 100px auto;
  17. }
  18. .wifi-symbol {
  19. width: 200px;
  20. height: 200px;
  21. margin-left: 18px;
  22. box-sizing: border-box;
  23. overflow: hidden;
  24. transform: rotate(45deg);
  25. }
  26. .wifi-circle {
  27. border: 10px solid #ccc;
  28. border-radius: 50%;
  29. position: absolute;
  30. }
  31. .first {
  32. width: 260px;
  33. height: 260px;
  34. top: 0;
  35. left: 0;
  36. animation: run1 4s linear infinite;
  37. }
  38. @keyframes run1 {
  39. 0% {
  40. border-color: #ccc;
  41. }
  42. 25% {
  43. border-color: #ccc;
  44. }
  45. 50% {
  46. border-color: #ccc;
  47. }
  48. 75% {
  49. border-color: #ccc;
  50. }
  51. 100% {
  52. border-color: #97a8e6;
  53. }
  54. }
  55. .second {
  56. width: 200px;
  57. height: 200px;
  58. top: 60px;
  59. left: 60px;
  60. animation: run2 4s linear infinite;
  61. }
  62. @keyframes run2 {
  63. 0% {
  64. border-color: #ccc;
  65. }
  66. 25% {
  67. border-color: #ccc;
  68. }
  69. 50% {
  70. border-color: #ccc;
  71. }
  72. 75% {
  73. border-color: #97a8e6;
  74. }
  75. 100% {
  76. border-color: #ccc;
  77. }
  78. }
  79. .third {
  80. width: 140px;
  81. height: 140px;
  82. top: 120px;
  83. left: 120px;
  84. animation: run3 4s linear infinite;
  85. }
  86. @keyframes run3 {
  87. 0% {
  88. border-color: #ccc;
  89. }
  90. 25% {
  91. border-color: #ccc;
  92. }
  93. 50% {
  94. border-color: #97a8e6;
  95. }
  96. 75% {
  97. border-color: #ccc;
  98. }
  99. 100% {
  100. border-color: #ccc;
  101. }
  102. }
  103. .fourth {
  104. width: 20px;
  105. height: 20px;
  106. background: #ccc;
  107. top: 180px;
  108. left: 180px;
  109. animation: run4 4s linear infinite;
  110. }
  111. @keyframes run4 {
  112. 0% {
  113. background: #ccc;
  114. border-color: #ccc;
  115. }
  116. 25% {
  117. background: #97a8e6;
  118. border-color: #97a8e6;
  119. }
  120. 50% {
  121. background: #ccc;
  122. border-color: #ccc;
  123. }
  124. 75% {
  125. background: #ccc;
  126. border-color: #ccc;
  127. }
  128. 100% {
  129. background: #ccc;
  130. border-color: #ccc;
  131. }
  132. }
  133. </style>
  134. </head>
  135. <body>
  136. <p class="box">
  137. <p class="wifi-symbol">
  138. <p class="wifi-circle first"></p>
  139. <p class="wifi-circle second"></p>
  140. <p class="wifi-circle third"></p>
  141. <p class="wifi-circle fourth">
  142. </p>
  143. </p>
  144. </body>
  145. </html>

以上就是本文的全部内容,希望对大家的学习有所帮助,更多相关内容请关注PHP中文网!

相关推荐:

CSS3中Transition动画属性的用法介绍

CSS3实现的10种Loading效果

CSS3三维变形实现立体方块

以上就是css3实现wifi信号逐渐增强的效果的详细内容,更多请关注Gxl网其它相关文章!

人气教程排行