-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
108 lines (92 loc) · 2.15 KB
/
style.css
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
97
98
99
100
101
102
103
104
105
106
107
108
body {
background-color: #FFFFFF; /* 白色 */
text-align: center;
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.container {
width: 90%; /* 适应手机屏幕宽度 */
max-width: 500px; /* 最大宽度限制 */
}
#mainImage {
width: 100%; /* 图片宽度自适应容器 */
max-width: 200px; /* 最大宽度限制 */
transition: all 0.3s ease;
}
h1 {
font-size: 5vw; /* 字体大小根据视口宽度变化 */
color: #68495b;
margin: 20px 0; /* 增加上下间距 */
}
button {
font-size: 4vw; /* 字体大小根据视口宽度变化 */
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
margin: 10px;
transition: all 0.3s ease;
}
#yes {
background-color: #FF0000; /* 红色 */
color: white;
}
#no {
background-color: #0000FF; /* 蓝色 */
color: white;
position: relative;
}
.yes-screen {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background-color: #FFFFFF; /* 白色 */
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.yes-text {
font-size: 7vw; /* 字体大小根据视口宽度变化 */
}
.yes-image {
width: 50%; /* 图片宽度自适应容器 */
max-width: 300px; /* 最大宽度限制 */
}
/* 电脑端样式优化 */
@media (min-width: 768px) {
body {
display: block;
}
.container {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: auto;
max-width: none;
}
#mainImage {
width: 200px; /* 固定图片宽度 */
}
h1 {
font-size: 28px; /* 固定字体大小 */
margin: 20px 0;
}
button {
font-size: 18px; /* 固定字体大小 */
}
.yes-text {
font-size: 36px; /* 固定字体大小 */
}
.yes-image {
width: 300px; /* 固定图片宽度 */
}
}