Files
AI-Video/templates/1080x1920/blur_card.html
2025-11-07 16:59:13 +08:00

126 lines
4.1 KiB
HTML

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=1080, height=1920">
<title>模糊背景卡片 - 1080x1920</title>
<!-- Google Fonts - 中文字体 -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;700;900&family=Noto+Serif+SC:wght@400;700;900&family=Liu+Jian+Mao+Cao&family=Ma+Shan+Zheng&display=swap" rel="stylesheet">
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 1080px; height: 1920px; overflow: hidden; }
body {
font-family: 'Noto Sans SC', 'PingFang SC', 'Source Han Sans', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
color: #fff;
position: relative;
background: transparent; /* 移除黑色背景 */
}
/* 背景使用图片并做模糊处理,完全覆盖整个页面 */
.bg {
position: fixed; /* 使用 fixed 确保完全覆盖 */
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url('{{image}}');
background-size: cover;
background-position: center;
filter: blur(24px) brightness(0.65);
transform: scale(1.1); /* 稍微放大防止边缘露出 */
z-index: 0;
}
/* 顶部标题区 */
.top {
position: relative;
z-index: 2;
height: 26%;
display: flex;
align-items: center; /* 改为居中,避免被遮挡 */
justify-content: center;
padding: 60px 70px 40px; /* 减少顶部padding */
text-align: center;
}
.title {
max-width: 920px;
font-size: 92px;
font-weight: 400;
line-height: 1.2;
text-shadow: 0 6px 22px rgba(0,0,0,0.6);
/* 使用 Ma Shan Zheng 毛笔字体 */
font-family: 'Ma Shan Zheng', 'PingFang SC', 'Source Han Sans', 'Microsoft YaHei', cursive;
letter-spacing: 4px;
}
/* 中部图片区(图片居中,填满宽度) */
.image-center {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 100%;
max-height: 58%;
z-index: 2;
padding: 0 0; /* 无左右内边距 */
}
.image-box { position: relative; width: 100%; height: 100%; }
.image-box img {
width: 100%;
height: 100%;
object-fit: cover; /* 改为 cover 填满宽度 */
display: block;
}
/* 底部字幕覆盖在图片底部 */
.caption {
position: absolute;
left: 50%;
bottom: 18px;
transform: translateX(-50%);
width: 96%; /* 稍微调整以适应全宽图片 */
text-align: center;
font-size: 54px;
font-weight: 900;
line-height: 1.2;
color: #ffffff;
font-family: 'ArtisticFont', 'Noto Serif SC', 'Noto Sans SC', 'PingFang SC', serif;
letter-spacing: 1px;
text-shadow: 0 0 0 #000,
-3px -3px 0 #000,
3px -3px 0 #000,
-3px 3px 0 #000,
3px 3px 0 #000,
0 10px 24px rgba(0,0,0,0.6);
}
@media (max-width: 1080px) {
.title { font-size: 80px; }
.caption { font-size: 48px; }
}
</style>
</head>
<body>
<div class="bg"></div>
<div class="top">
<div class="title">{{title}}</div>
</div>
<div class="image-center">
<div class="image-box">
<img src="{{image}}" alt="内容图片">
<div class="caption">{{text}}</div>
</div>
</div>
</body>
</html>