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