-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvideo-background.css
More file actions
96 lines (78 loc) · 1.45 KB
/
video-background.css
File metadata and controls
96 lines (78 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
header {
position: relative;
min-height: 100vh;
width: 100%;
overflow: hidden;
margin-top: 0;
margin-bottom: 0;
/* 確保沒有上邊距 */
display: block;
/* 確保正確的顯示方式 */
}
header .logo2 {
position: absolute;
top: 40%;
left: 50%;
/* 水平置中 */
transform: translate(-50%, -50%);
/* 確保置中 */
width: 40%;
z-index: 1;
}
header .logo2[data-aos] {
transform: translate(-50%, -50%) !important;
/* 防止 AOS 覆蓋 */
}
header .logo2 img {
width: 100%;
}
.pic-txt {
position: absolute;
bottom: 0.5vw;
color: #fff;
font-family: "SweiSpringCJKtc-Medium";
font-size: 1.2vw;
text-transform: uppercase;
text-shadow: 0.05vw 0.05vw 0.05vw #333;
right: 1.5vw;
}
.bg-color {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
}
/* 手機版樣式 */
@media (max-width: 1440px) {
header .logo2 {
width: 50%;
}
}
@media (max-width: 768px) {
header {
min-height: auto;
/* 讓 header 高度自適應 */
height: 100vh;
/* 設定為螢幕高度 */
}
header .logo2 {
top: 50%;
/* 調整到正中央 */
width: 70%;
/* 縮小 logo 大小 */
}
.bg-color {
width: 100vw;
/* 背景色塊寬度填滿螢幕 */
height: 100vh;
/* 背景色塊高度填滿螢幕 */
}
.pic-txt {
font-size: 3vw;
/* 調整文字大小 */
bottom: 2vw;
/* 增加底部間距 */
}
}