当前位置:   article > 正文

帮我写一个复杂的爱心树html代码

爱心树代码html
  1. <p>好的,以下是一个复杂的爱心树的HTML代码:</p>
  2. <p>```
  3. <!DOCTYPE html></p>
  4. <html>
  5. <head>
  6. <title>爱心树</title>
  7. <style>
  8. body {
  9. background-color: #e0f2f1;
  10. }
  11. #heart-tree {
  12. width: 100%;
  13. height: 500px;
  14. position: relative;
  15. }
  16. #heart-tree:before,
  17. #heart-tree:after {
  18. content: "";
  19. position: absolute;
  20. background: #c2185b;
  21. border-radius: 50%;
  22. }
  23. #heart-tree:before {
  24. width: 20px;
  25. height: 20px;
  26. top: -10px;
  27. left: 50%;
  28. transform: translateX(-50%);
  29. }
  30. #heart-tree:after {
  31. width: 15px;
  32. height: 15px;
  33. top: 0;
  34. left: 56%;
  35. transform: translateX(-50%);
  36. }
  37. #heart-tree .heart {
  38. position: absolute;
  39. top: 50%;
  40. left: 50%;
  41. transform: translate(-50%, -50%);
  42. width: 5px;
  43. height: 5px;
  44. background-color: #c2185b;
  45. border-radius: 50%;
  46. box-shadow: 0px 0px 10px 2px #c2185b;
  47. }
  48. #heart-tree .heart:before,
  49. #heart-tree .heart:after {
  50. content: "";
  51. position: absolute;
  52. width: 5px;
  53. height: 5px;
  54. background-color: #c2185b;
  55. border-radius: 50%;
  56. box-shadow: 0px 0px 10px 2px #c2185b;
  57. }
  58. #heart-tree .heart:before {
  59. top: -5px;
  60. left: 0;
  61. }
  62. #heart-tree .heart:after {
  63. top: 0;
  64. left: 5px;
  65. }
  66. #heart-tree .leaf {
  67. position: absolute;
  68. width: 10px;
  69. height: 10px;
  70. border-radius: 50%;
  71. background-color: #33691e;
  72. transform: rotate(45deg);
  73. }
  74. #heart-tree .leaf:nth-child(1) {
  75. top: 90px;
  76. left: 65px;
  77. }
  78. #heart-tree .leaf:nth-child(2) {
  79. top: 120px;
  80. left: 90px;
  81. }
  82. #heart-tree .leaf:nth-child(3) {
  83. top: 150px;
  84. left: 65px;
  85. }
  86. #heart-tree .leaf:nth-child(4) {
  87. top: 180px;
  88. left: 90px;
  89. }
  90. #heart-tree .leaf:nth-child(5) {
  91. top: 210px;
  92. left: 65px;
  93. }
  94. #heart-tree .leaf:nth-child(6) {
  95. top: 240px;
  96. left: 90px;
  97. }
  98. #heart-tree .leaf:nth-child(7) {
  99. top: 270px;
  100. left: 65px;
  101. }
  102. #heart-tree .leaf:nth-child(8) {
  103. top: 300px;
  104. left: 90px;
  105. }
  106. #heart-tree .leaf:nth-child(9) {
  107. top: 330px;
  108. left: 65px;
  109. }
  110. #heart-tree .leaf:nth-child(10) {
  111. top: 360px;
  112. left: 90px;
  113. }
  114. </style
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小丑西瓜9/article/detail/120660?site
推荐阅读
相关标签
  

闽ICP备14008679号