- 新增 page3.html:无「天」背景的演职员表与火山场景 - 重构为页面专属 CSS/JS 与共用的 text-scene 渲染引擎 - PDF 导出支持 --page 参数
70 lines
1.5 KiB
CSS
70 lines
1.5 KiB
CSS
/* 三页共用:字体、页面骨架、文字网格与标题框 */
|
||
|
||
@font-face {
|
||
font-family: "Zpix";
|
||
src: url("../fonts/zpix.ttf") format("truetype");
|
||
font-display: swap;
|
||
}
|
||
|
||
* { box-sizing: border-box; }
|
||
|
||
html, body {
|
||
margin: 0;
|
||
padding: 0;
|
||
background: #000;
|
||
}
|
||
|
||
body {
|
||
min-height: 100dvh;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
overflow: hidden;
|
||
font-family: "Zpix", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
|
||
"Noto Sans SC", "Source Han Sans SC", sans-serif;
|
||
-webkit-text-size-adjust: 100%;
|
||
}
|
||
|
||
/* 28 列 × 44 行文字网格,1em = 1 个汉字;
|
||
字号统一在此控制,所有元素(含天线)字号一致 */
|
||
.scene {
|
||
position: relative;
|
||
font-size: min(3.4vw, calc(100dvh / 44));
|
||
line-height: 1em;
|
||
width: 28em;
|
||
height: 44em;
|
||
user-select: none;
|
||
font-kerning: none;
|
||
}
|
||
|
||
.line {
|
||
display: block;
|
||
height: 1em;
|
||
line-height: 1em;
|
||
white-space: pre;
|
||
/* Zpix 单字步进为 13/12 em,补偿回 1em,保证 28 列正好落在 28em 内 */
|
||
letter-spacing: -0.083333em;
|
||
}
|
||
|
||
/* 标题框:按整格扣出的黑色矩形,位置与尺寸由页面数据决定 */
|
||
.title-panel {
|
||
position: absolute;
|
||
z-index: 1;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
background: #000;
|
||
}
|
||
|
||
.title-panel .title {
|
||
margin: 0;
|
||
color: #e6e6e6;
|
||
font-size: 1.8em;
|
||
font-weight: 400;
|
||
line-height: 1;
|
||
letter-spacing: 0;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.title-panel .title-em { color: #fff; }
|