返回 VideoClaw
image_psychology_card.html
根目录 / video-claw / video-claw / backend / templates / 1080x1920 / image_psychology_card.html
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=1080, height=1920">
8 <title>心理卡片风 - 1080x1920</title>
9 <style>
10 * { margin: 0; padding: 0; box-sizing: border-box; }
11
12 html, body { width: 1080px; height: 1920px; overflow: hidden; }
13
14 body {
15 font-family: 'PingFang SC', 'Source Han Sans', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
16 background: #0a0a0a;
17 display: flex;
18 flex-direction: column;
19 color: #fff;
20 position: relative; /* 作为整页定位上下文 */
21 }
22
23 /* 顶部黑底标题区 */
24 .top {
25 height: 20%;
26 background: #0a0a0a;
27 padding: 100px 70px 40px;
28 display: flex;
29 align-items: flex-end;
30 justify-content: center;
31 text-align: center;
32 }
33
34 .title {
35 max-width: 920px;
36 font-size: 96px;
37 font-weight: 900;
38 line-height: 1.2;
39 letter-spacing: 2px;
40 color: #ffffff;
41 text-shadow: 0 6px 22px rgba(0,0,0,0.5);
42 }
43
44 /* 中部容器可保持为空壳,仅用于分区 */
45 .middle { height: 70%; }
46
47 /* 将图片中心对齐到整页正中心(与标题无关) */
48 .media {
49 position: absolute;
50 top: 40%;
51 left: 50%;
52 transform: translate(-50%, -50%);
53 max-width: 86%;
54 max-height: 58%;
55 background: transparent;
56 border: none;
57 box-shadow: none;
58 }
59 .media img { width: 100%; height: 100%; object-fit: contain; display: block; }
60
61 /* 字幕移动到上方红框区域(大致页面下部的上方位置) */
62 .caption {
63 position: absolute;
64 left: 50%;
65 bottom: 320px; /* 向上移动至上方槽位 */
66 transform: translateX(-50%);
67 width: 86%; /* 与图片宽度对齐 */
68 max-width: 930px;
69 text-align: center;
70 font-size: 54px;
71 font-weight: 900;
72 line-height: 1.2;
73 color: #fefefe;
74 text-shadow: 0 0 0 #000,
75 -3px -3px 0 #000,
76 3px -3px 0 #000,
77 -3px 3px 0 #000,
78 3px 3px 0 #000;
79 }
80
81 @media (max-width: 1080px) { .title { font-size: 84px; } .caption { font-size: 48px; bottom: 600px; } }
82 </style>
83 </head>
84 <body>
85 <div class="top">
86 <div class="title">{{title}}</div>
87 </div>
88
89 <div class="middle"></div>
90
91 <div class="media"><img src="{{image}}" alt="内容图片"></div>
92 <div class="caption">{{text}}</div>
93 </body>
94 </html>
95
95 lines HTML