image_cartoon.html 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="template:media-width" content="1024">
  6. <meta name="template:media-height" content="1024">
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8. <title>{{title}}</title>
  9. <style>
  10. * {
  11. margin: 0;
  12. padding: 0;
  13. box-sizing: border-box;
  14. font-family: 'Comic Sans MS', 'Marker Felt', 'Arial Rounded MT Bold', sans-serif;
  15. }
  16. body {
  17. width: 1080px;
  18. height: 1920px;
  19. background-image: url('https://lmg.jj20.com/up/allimg/sj02/210122142U11054-0-lp.jpg');
  20. background-size: cover;
  21. background-position: center;
  22. display: flex;
  23. flex-direction: column;
  24. align-items: center;
  25. justify-content: flex-start;
  26. padding: 40px 20px 0 20px;
  27. gap: 30px;
  28. position: relative;
  29. overflow: hidden;
  30. }
  31. /* 卡通装饰元素 */
  32. .cloud {
  33. position: absolute;
  34. background: rgba(255, 255, 255, 0.8);
  35. border-radius: 50%;
  36. z-index: -1;
  37. }
  38. .cloud:before, .cloud:after {
  39. content: '';
  40. position: absolute;
  41. background: rgba(255, 255, 255, 0.8);
  42. border-radius: 50%;
  43. }
  44. .cloud-1 {
  45. width: 120px;
  46. height: 60px;
  47. top: 10%;
  48. left: 5%;
  49. }
  50. .cloud-1:before {
  51. width: 70px;
  52. height: 70px;
  53. top: -30px;
  54. left: 10px;
  55. }
  56. .cloud-1:after {
  57. width: 50px;
  58. height: 50px;
  59. top: -20px;
  60. right: 10px;
  61. }
  62. .cloud-2 {
  63. width: 150px;
  64. height: 70px;
  65. bottom: 15%;
  66. right: 5%;
  67. }
  68. .cloud-2:before {
  69. width: 80px;
  70. height: 80px;
  71. top: -35px;
  72. left: 15px;
  73. }
  74. .cloud-2:after {
  75. width: 60px;
  76. height: 60px;
  77. top: -25px;
  78. right: 20px;
  79. }
  80. /* 标题样式 */
  81. .title-container {
  82. background-color: rgba(255, 255, 255, 0.85);
  83. padding: 20px 40px;
  84. border-radius: 25px;
  85. box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  86. text-align: center;
  87. border: 5px solid #FF9ED8;
  88. max-width: 90%;
  89. position: relative;
  90. z-index: 10;
  91. }
  92. .title-container h1 {
  93. font-size: 48px;
  94. color: #FF5BAE;
  95. text-shadow: 3px 3px 0 #FFC2E9;
  96. margin: 0;
  97. }
  98. /* 图片容器 */
  99. .image-container {
  100. width: 1024px;
  101. height: 1024px;
  102. background-color: rgba(255, 255, 255, 0.9);
  103. border-radius: 30px;
  104. display: flex;
  105. align-items: center;
  106. justify-content: center;
  107. box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  108. border: 8px solid #A6E3FF;
  109. overflow: hidden;
  110. position: relative;
  111. z-index: 10;
  112. }
  113. .image-container img {
  114. max-width: 95%;
  115. max-height: 95%;
  116. border-radius: 15px;
  117. object-fit: contain;
  118. }
  119. /* 字幕样式 */
  120. .caption-container {
  121. background-color: rgba(255, 255, 255, 0.9);
  122. padding: 25px 40px;
  123. border-radius: 25px;
  124. box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  125. text-align: center;
  126. border: 5px solid #B5FFA6;
  127. max-width: 90%;
  128. position: relative;
  129. z-index: 10;
  130. }
  131. .caption-container p {
  132. font-size: 36px;
  133. color: #5BAE5B;
  134. line-height: 1.4;
  135. text-shadow: 2px 2px 0 #C2FFC2;
  136. margin: 0;
  137. }
  138. /* 装饰元素 */
  139. .decoration {
  140. position: absolute;
  141. z-index: 5;
  142. }
  143. .star {
  144. width: 30px;
  145. height: 30px;
  146. background-color: #FFF9A6;
  147. clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  148. }
  149. .star-1 {
  150. top: 15%;
  151. right: 10%;
  152. transform: rotate(15deg);
  153. }
  154. .star-2 {
  155. bottom: 20%;
  156. left: 8%;
  157. transform: rotate(-10deg);
  158. width: 40px;
  159. height: 40px;
  160. }
  161. .heart {
  162. width: 40px;
  163. height: 40px;
  164. background-color: #FF9ED8;
  165. transform: rotate(-45deg);
  166. position: absolute;
  167. }
  168. .heart:before, .heart:after {
  169. content: '';
  170. width: 40px;
  171. height: 40px;
  172. background-color: #FF9ED8;
  173. border-radius: 50%;
  174. position: absolute;
  175. }
  176. .heart:before {
  177. top: -20px;
  178. left: 0;
  179. }
  180. .heart:after {
  181. top: 0;
  182. left: 20px;
  183. }
  184. .heart-1 {
  185. top: 12%;
  186. left: 12%;
  187. }
  188. .heart-2 {
  189. bottom: 25%;
  190. right: 12%;
  191. width: 30px;
  192. height: 30px;
  193. }
  194. .heart-2:before, .heart-2:after {
  195. width: 30px;
  196. height: 30px;
  197. }
  198. .heart-2:before {
  199. top: -15px;
  200. }
  201. .heart-2:after {
  202. left: 15px;
  203. }
  204. </style>
  205. </head>
  206. <body>
  207. <!-- 装饰元素 -->
  208. <div class="cloud cloud-1"></div>
  209. <div class="cloud cloud-2"></div>
  210. <div class="decoration star star-1"></div>
  211. <div class="decoration star star-2"></div>
  212. <div class="decoration heart heart-1"></div>
  213. <div class="decoration heart heart-2"></div>
  214. <!-- 标题区域 -->
  215. <div class="title-container">
  216. <h1>{{title}}</h1>
  217. </div>
  218. <!-- 图片区域 -->
  219. <div class="image-container">
  220. <img src="{{image}}" alt="卡通图片">
  221. </div>
  222. <!-- 字幕区域 -->
  223. <div class="caption-container">
  224. <p>{{text}}</p>
  225. </div>
  226. </body>
  227. </html>