|
14 | 14 | > |
15 | 15 | <div |
16 | 16 | class="ticket relative text-[32px] text-gray-800 w-full h-full rounded-[14px] shadow-[0_6px_24px_rgba(0,0,0,.12),0_2px_6px_rgba(0,0,0,.08)] border border-[#b8cfe0] overflow-hidden p-[5px_65px_0_50px]" |
17 | | - role="img" |
| 17 | + role="img" |
18 | 18 | aria-label="火车票"> |
19 | 19 |
|
20 | 20 | <!-- 顶部:票号/检票口 --> |
|
24 | 24 | </div> |
25 | 25 |
|
26 | 26 | <div class="bgmain"> |
| 27 | + <div |
| 28 | + class="absolute inset-0 z-[-2] opacity-5 bg-bottom bg-no-repeat bg-contain" |
| 29 | + :style="{ backgroundImage: 'url(/CRH-Dr3OhT7q.jpg)' }" |
| 30 | + ></div> |
27 | 31 | <div class="h-[250px]"> |
28 | 32 | <!-- 主信息:出发站 / 车次 / 到达站 --> |
29 | | - <div class="main grid grid-cols-[1fr_auto_1fr] gap-[10px] px-[0px_40px_0_20px]"> |
30 | | - <div class="station from items-center"> |
31 | | - <div class="flex items-end flex-grow-0"> |
| 33 | + <div class="main grid grid-cols-[1fr_auto_1fr] gap-[10px] px-[0px_40px_0_20px] items-center"> |
| 34 | + <div class="station flex flex-col from items-center"> |
| 35 | + <div class="flex items-center flex-grow-0"> |
32 | 36 | <div |
33 | 37 | class="name text-[45px] tracking-[0.5px] max-w-[240px]" |
34 | 38 | :class="{'two-char': fromStation.length === 2}" |
35 | 39 | > |
36 | 40 | {{ fromStation }} |
37 | 41 | </div> |
38 | | - <div class="big-fix px-[4px] py-[0px] text-[40px] self-start">站</div> |
| 42 | + <div class="big-fix px-[4px] py-[0px] text-[35px]">站</div> |
39 | 43 | </div> |
40 | | - <div class="pinyin ml-[10px] text-[24px] text-[#3a5874]">{{ fromPinyin }}</div> |
| 44 | + <div class="pinyin ml-[10px] text-[24px]">{{ fromPinyin }}</div> |
41 | 45 | </div> |
42 | | - <div class="train-code text-center text-[50px] pb-0 flex items-center justify-center">{{ trainCode }}</div> |
43 | | - <div class="station to items-center"> |
44 | | - <div class="flex items-end flex-grow-0"> |
| 46 | + <!-- 中间列:车次 + 箭头 --> |
| 47 | + <div class="train-center flex flex-col items-center justify-center"> |
| 48 | + <div class="train-code text-center text-[50px] leading-none pb-1"> |
| 49 | + {{ trainCode }} |
| 50 | + </div> |
| 51 | + <!-- 箭头 --> |
| 52 | + <!-- CSS 箭头 --> |
| 53 | + <div class="arrow mt-[6px] relative h-3 w-full"> |
| 54 | + <div class="line h-[4px] bg-gray-600 w-full"></div> |
| 55 | + <div class="arrow-head absolute right-0 top-[-7px] h-4 w-4 border-t-[4px] border-gray-600 rotate-45"></div> |
| 56 | + </div> |
| 57 | + </div> |
| 58 | + <div class="station to flex flex-col items-center"> |
| 59 | + <div class="flex items-center flex-grow-0"> |
45 | 60 | <div |
46 | 61 | class="name text-[45px] tracking-[0.5px] max-w-[240px]" |
47 | 62 | :class="{'two-char': toStation.length === 2}" |
48 | 63 | > |
49 | 64 | {{ toStation }} |
50 | 65 | </div> |
51 | | - <div class="big-fix px-[4px] py-[0px] text-[40px] self-start">站</div> |
| 66 | + <div class="big-fix px-[4px] py-[0px] text-[35px]">站</div> |
52 | 67 | </div> |
53 | | - <div class="pinyin ml-[10px] text-[24px] text-[#3a5874]">{{ toPinyin }}</div> |
| 68 | + <div class="pinyin ml-[10px] text-[24px]">{{ toPinyin }}</div> |
54 | 69 | </div> |
55 | 70 | </div> |
56 | 71 |
|
@@ -208,22 +223,30 @@ defineExpose({ wrapper, exporting }) // ✅ 暴露内部DOM给父组件访问 |
208 | 223 | } |
209 | 224 |
|
210 | 225 | /* 背景图 */ |
211 | | -.bgmain::before { |
| 226 | +/* .bgmain::before { |
212 | 227 | content: ""; |
213 | 228 | position: absolute; |
214 | 229 | inset: 0; |
215 | 230 | z-index: -2; |
216 | 231 | opacity: 0.05; |
217 | | - background-image: url('./CRH-Dr3OhT7q.jpg'); |
| 232 | + background-image: url('/CRH-Dr3OhT7q.jpg'); |
218 | 233 | background-size: contain; |
219 | 234 | background-repeat: no-repeat; |
220 | 235 | background-position: bottom; |
221 | | -} |
| 236 | +} */ |
222 | 237 |
|
223 | 238 | /* 两字站名样式 */ |
224 | 239 | .two-char { |
225 | 240 | min-width: 145px; |
226 | 241 | text-align: justify; |
227 | 242 | text-align-last: justify; |
228 | 243 | } |
| 244 | +.train-arrow { |
| 245 | + width: 100%; /* 与“G2025”文字宽度完全一致 */ |
| 246 | + height: 0; |
| 247 | + border-left: 8px solid transparent; /* 左透明边框(数值越小箭头越细) */ |
| 248 | + border-right: 8px solid transparent; /* 右透明边框(与左边数值一致) */ |
| 249 | + border-top: 8px solid #3a5874; /* 箭头颜色(与拼音同色) */ |
| 250 | + margin-top: 6px; /* 箭头与文字的间距(可按需调整) */ |
| 251 | +} |
229 | 252 | </style> |
0 commit comments