64 lines
1.4 KiB
CSS
64 lines
1.4 KiB
CSS
body {
|
|
font-family: Arial, sans-serif;
|
|
line-height: 1.6;
|
|
margin: 0;
|
|
padding: 0;
|
|
padding-top: 20px;
|
|
/* 使用 flexbox 布局实现 body 内元素的居中 */
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
/* 确保 body 至少占据整个视口的高度 */
|
|
min-height: 100vh;
|
|
}
|
|
|
|
.content {
|
|
/* 可选:添加一些内边距,让内容不紧贴容器边缘 */
|
|
padding: 20px;
|
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
|
/* 设置背景颜色为纯白色 */
|
|
background-color: #ffffff;
|
|
color: #333;
|
|
width: 40%;
|
|
max-width: 1200px;
|
|
/* 保留 margin: 0 auto; 用于水平居中 */
|
|
margin: 0 auto;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.content {
|
|
width: 95%;
|
|
/* 全屏展示 */
|
|
padding-top: 10px;
|
|
padding: 10px;
|
|
/* 适当调整内边距 */
|
|
}
|
|
}
|
|
|
|
/* 定义单选按钮容器样式 */
|
|
.scale-button {
|
|
display: flex;
|
|
gap: 10px;
|
|
/* 按钮之间的间距 */
|
|
}
|
|
|
|
/* 定义单选按钮隐藏样式 */
|
|
.scale-button input[type="radio"] {
|
|
display: none;
|
|
}
|
|
|
|
/* 定义单选按钮标签样式 */
|
|
.scale-button label {
|
|
flex-grow: 1;
|
|
padding: 10px 20px;
|
|
border: 1px solid #ccc;
|
|
border-radius: 5px;
|
|
cursor: pointer;
|
|
text-align: center;
|
|
}
|
|
|
|
/* 定义单选按钮选中时标签样式 */
|
|
.scale-button input[type="radio"]:checked+label {
|
|
background-color: #007BFF;
|
|
color: white;
|
|
} |