给网站添加个HTML灯笼-元旦灯笼代码

2024元旦即将来临PC+移动自适应
快来给你的网站加一盏喜庆的灯笼,迎接春节吧。如图,你的网站右上角出现一对灯笼。事不宜迟,放下面的代码祝你元旦快乐。

使用方法

代码复制到网站模板的公共页眉或页脚中,并自定义标签上方的页眉HTML代码

给网站添加个HTML灯笼-元旦灯笼代码
%ignore_pre_1%

  1. <!–春节双灯笼+梅花代码–&gt;
  2. <div class=“meiha”&gt;</div&gt;
  3. <style&gt;
  4. /** 小牛角博客 **/
  5. .meiha {
  6. position: fixed;
  7. top: 0;
  8. right: 0;
  9. z-index: 999;
  10. width: 350px;
  11. /** PNG图宽度 **/
  12. height: 231px;
  13. /** PNG图高度 **/
  14. pointer-events: none;
  15. background: url(https://photo.zhou-si.com/images/2021/12/21/meihuashua46e98cd8abfc132.png);
  16. }
  17. </style&gt;
  18. <meta charset=“utf-8″&gt;
  19. <div class=“dengbox2″&gt;
  20. <div class=“deng&gt;
  21. <div class=xian”&gt;
  22. </div&gt;
  23. <div class=“deng-a”&gt;
  24. <div class=“dengb&gt;
  25. <div class=“deng-t”&gt;</div&gt;
  26. </div&gt;
  27. </div&gt;
  28. <div class=shui shui-a”&gt;
  29. <div class=shui-c”&gt;
  30. </div&gt;
  31. <div class=shui-b&gt;</div&gt;
  32. </div&gt;
  33. </div&gt;
  34. </div&gt;
  35. <div class=“dengbox3″&gt;
  36. <div class=“deng&gt;
  37. <div class=xian”&gt;
  38. </div&gt;
  39. <div class=“deng-a”&gt;
  40. <div class=“dengb&gt;
  41. <div class=“deng-t”&gt;</div&gt;
  42. </div&gt;
  43. </div&gt;
  44. <div class=shui shui-a”&gt;
  45. <div class=shui-c”&gt;</div&gt;
  46. <div class=shui-b&gt;
  47. </div&gt;
  48. </div&gt;
  49. </div&gt;
  50. </div&gt;
  51. <div class=“dengbox1″&gt;
  52. <div class=“deng&gt;
  53. <div class=xian”&gt;
  54. </div&gt;
  55. <div class=“deng-a”&gt;
  56. <div class=“dengb&gt;
  57. <div class=“deng-t”&gt;</div&gt;
  58. </div&gt;
  59. </div&gt;
  60. <div class=shui shui-a”&gt;
  61. <div class=shui-c”&gt;</div&gt;
  62. <div class=shui-b&gt;</div&gt;
  63. </div&gt;
  64. </div&gt;
  65. </div&gt;
  66. <div class=“dengbox&gt;
  67. <div class=“deng&gt;
  68. <div class=xian”&gt;
  69. </div&gt;
  70. <div class=“deng-a”&gt;
  71. <div class=“dengb&gt;
  72. <div class=“deng-t”&gt;</div&gt;
  73. </div&gt;
  74. </div&gt;
  75. <div class=shui shui-a”&gt;
  76. <div class=shui-c”&gt;
  77. </div&gt;
  78. <div class=shui-b&gt;</div&gt;
  79. </div&gt;
  80. </div&gt;
  81. </div&gt;
  82. <style type=“text/css&gt;
  83. .dengbox {
  84. position: fixed;
  85. top: –40px;
  86. right: 150px;
  87. z-index: 9999;
  88. pointer-events: none;
  89. }
  90. .dengbox1 {
  91. position: fixed;
  92. top: –30px;
  93. right: 10px;
  94. z-index: 9999;
  95. pointer-events: none
  96. }
  97. .dengbox2 {
  98. position: fixed;
  99. top: –40px;
  100. left: 150px;
  101. z-index: 9999;
  102. pointer-events: none
  103. }
  104. .dengbox3 {
  105. position: fixed;
  106. top: –30px;
  107. left: 10px;
  108. z-index: 9999;
  109. pointer-events: none
  110. }
  111. .dengbox1 .deng,
  112. .dengbox3 .deng {
  113. position: relative;
  114. width: 120px;
  115. height: 90px;
  116. margin: 50px;
  117. background: #d8000f;
  118. background: rgba(216, 0, 15, .8);
  119. border-radius: 50% 50%;
  120. -webkit-transform-origin: 50%100px;
  121. -webkit-animation: swing 5s infinite ease-in-out;
  122. boxshadow: –5px 5px 30px 4px #fc903d
  123. }
  124. .deng {
  125. position: relative;
  126. width: 120px;
  127. height: 90px;
  128. margin: 50px;
  129. background: #d8000f;
  130. background: rgba(216, 0, 15, .8);
  131. border-radius: 50% 50%;
  132. -webkit-transform-origin: 50%100px;
  133. -webkit-animation: swing 3s infinite ease-in-out;
  134. boxshadow: –5px 5px 50px 4px #fa6c00
  135. }
  136. .deng-a {
  137. width: 100px;
  138. height: 90px;
  139. background: #d8000f;
  140. background: rgba(216, 0, 15, .1);
  141. margin: 12px 8px 8px 8px;
  142. border-radius: 50% 50%;
  143. border: 2px solid #dc8f03
  144. }
  145. .dengb {
  146. width: 45px;
  147. height: 90px;
  148. background: #d8000f;
  149. background: rgba(216, 0, 15, .1);
  150. margin: –4px 8px 8px 26px;
  151. border-radius: 50% 50%;
  152. border: 2px solid #dc8f03
  153. }
  154. .xian {
  155. position: absolute;
  156. top: –20px;
  157. left: 60px;
  158. width: 2px;
  159. height: 20px;
  160. background: #dc8f03
  161. }
  162. .shui-a {
  163. position: relative;
  164. width: 5px;
  165. height: 20px;
  166. margin: –5px 0 0 59px;
  167. -webkit-animation: swing 4s infinite ease-in-out;
  168. -webkit-transform-origin: 50%45px;
  169. background: orange;
  170. border-radius: 0 0 5px 5px
  171. }
  172. .shui-b {
  173. position: absolute;
  174. top: 14px;
  175. left: –2px;
  176. width: 10px;
  177. height: 10px;
  178. background: #dc8f03;
  179. border-radius: 50%
  180. }
  181. .shui-c {
  182. position: absolute;
  183. top: 18px;
  184. left: –2px;
  185. width: 10px;
  186. height: 35px;
  187. background: orange;
  188. border-radius: 0 0 0 5px
  189. }
  190. .deng:before {
  191. position: absolute;
  192. top: –7px;
  193. left: 29px;
  194. height: 12px;
  195. width: 60px;
  196. content: ” “;
  197. display: block;
  198. z-index: 999;
  199. border-radius: 5px 5px 0 0;
  200. border: solid 1px #dc8f03;
  201. background: orange;
  202. background: linear-gradient(to right, #dc8f03, orange, #dc8f03, orange, #dc8f03)
  203. }
  204. .deng:after {
  205. position: absolute;
  206. bottom: –7px;
  207. left: 10px;
  208. height: 12px;
  209. width: 60px;
  210. content: ” “;
  211. display: block;
  212. margin-left: 20px;
  213. border-radius: 0 0 5px 5px;
  214. border: solid 1px #dc8f03;
  215. background: orange;
  216. background: linear-gradient(to right, #dc8f03, orange, #dc8f03, orange, #dc8f03)
  217. }
  218. .deng-t {
  219. font-family: 黑体, Arial, Lucida Grande, Tahoma, sans-serif;
  220. font-size: 3.2rem;
  221. color: #dc8f03;
  222. font-weight: 700;
  223. lineheight: 85px;
  224. text-align: center
  225. }
  226. .night .dengbox,
  227. .night .dengbox1,
  228. .night .deng-t {
  229. background: 0 0 !important
  230. }
  231. @-mozkeyframes swing {
  232. 0% {
  233. -moz-transform: rotate(-10deg)
  234. }
  235. 50% {
  236. -moz-transform: rotate(10deg)
  237. }
  238. 100% {
  239. -moz-transform: rotate(-10deg)
  240. }
  241. }
  242. @-webkitkeyframes swing {
  243. 0% {
  244. -webkit-transform: rotate(-10deg)
  245. }
  246. 50% {
  247. -webkit-transform: rotate(10deg)
  248. }
  249. 100% {
  250. -webkit-transform: rotate(-10deg)
  251. }
  252. }
  253. </style&gt;

%ignore_pre_2%

本站资源均为作者提供和网友推荐收集整理而来,仅供学习和研究使用,请在下载后24小时内删除,谢谢合作!
给网站添加个HTML灯笼-元旦灯笼代码|不死鸟资源网
给网站添加个HTML灯笼-元旦灯笼代码
此内容为免费资源,请登录后查看
¥0
限时特惠
¥99
文章采用CC BY-NC-SA 4.0许可协议授权
免费资源
THE END
点赞5445 分享