-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcss.css
104 lines (92 loc) · 2.1 KB
/
css.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
.container {
display: flex;
align-items: center;
flex-direction: column;
/* justify-content: center; */
margin-top: 60px;
/* height: 100vh; */
}
.chart-container {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
text-align: center;
margin-bottom: 20px;
}
#chart1 {
height: 300px;
width: 520px;
margin: 0 auto;
}
#chart2 {
height: 300px;
width: 570px;
margin: 20px auto;
}
#chart3 {
height: 300px;
width: 570px;
margin: 0 auto;
}
#image-container {
margin-bottom: 100px;
}
svg {
margin: 0 auto;
display: block;
}
hr {
width: 50%;
border: none;
/* border-top: 1px solid #ccc; */
margin: 15px 20px 20px 20px;
border-top: 1px dashed rgb(184, 184, 184);
}
/* 使 chart-container 相对定位 */
.chart-container {
position: relative;
}
/* 按钮容器样式,确保按钮与图表右侧对齐 */
.button-container {
position: absolute;
right: 400px;
top: 120px;
display: flex;
align-items: center;
}
/* 按钮的基础样式 */
#toggleGender {
background-color: rgba(139, 69, 19, 0.5);
color: white;
border: 1px solid #8B4513;
border-radius: 2px;
padding: 4px 8px;
cursor: pointer;
font-family: 'Times New Roman', serif;
font-weight: bold;
font-size: 14px;
transition: background-color 0.3s, transform 0.1s;
}
#ageToggleGender{
background-color: rgba(139, 69, 19, 0.5);
color: white;
border: 1px solid #8B4513;
border-radius: 2px;
padding: 4px 8px;
cursor: pointer;
font-family: 'Times New Roman', serif;
font-weight: bold;
font-size: 14px;
transition: background-color 0.3s, transform 0.1s;
}
/* 鼠标悬停时的效果 */
#toggleGender:hover {
background-color: rgba(139, 69, 19, 1); /* 鼠标悬停时变深 */
transform: scale(1.05); /* 微微放大 */
}
/* 鼠标按下时的效果 */
#toggleGender:active {
background-color: rgba(105, 50, 18, 0.9); /* 点击时的深棕色 */
transform: scale(0.95); /* 轻微缩小 */
}