You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

114 lines
2.1 KiB
CSS

/* style.css */
/* 全局样式和基础布局 */
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
background-color: #f4f5f7;
color: #172b4d;
margin: 0;
padding: 20px;
display: flex;
justify-content: center;
}
.container {
width: 100%;
max-width: 800px;
background-color: #ffffff;
padding: 24px 48px;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
box-sizing: border-box;
}
h1 {
color: #091e42;
text-align: center;
}
p {
text-align: center;
color: #5e6c84;
margin-bottom: 24px;
}
/* 文本输入框样式 */
textarea#text-input {
width: 100%;
padding: 12px;
border: 2px solid #dfe1e6;
border-radius: 4px;
font-size: 14px;
box-sizing: border-box;
resize: vertical; /* 允许用户垂直调整大小 */
transition: border-color 0.2s, box-shadow 0.2s;
}
textarea#text-input:focus {
outline: none;
border-color: #4c9aff;
box-shadow: 0 0 0 2px rgba(76, 154, 255, 0.3);
}
/* 按钮样式 */
button#generate-btn {
display: block;
width: 100%;
padding: 12px;
margin: 20px 0;
background-color: #0052cc;
color: white;
border: none;
border-radius: 4px;
font-size: 16px;
font-weight: bold;
cursor: pointer;
transition: background-color 0.2s;
}
button#generate-btn:hover {
background-color: #0065ff;
}
button#generate-btn:active {
background-color: #0747a6;
}
/* 二维码容器和项目样式 */
#qrcode-container {
margin-top: 24px;
display: flex;
flex-direction: column; /* 垂直排列 */
align-items: center; /* 居中对齐 */
gap: 30px; /* 二维码之间的间距 */
}
.qrcode-item {
display: flex;
flex-direction: column;
align-items: center;
padding: 15px;
background-color: #fafbfc;
border: 1px solid #dfe1e6;
border-radius: 4px;
}
.qrcode-label {
font-size: 14px;
font-weight: bold;
color: #5e6c84;
margin-bottom: 10px;
}
/*
通过 CSS 限制二维码图片的最大宽度,以防其在页面上过大。
高度设为 auto 以保持其宽高比。
*/
.qrcode-item img {
max-width: 400px;
height: auto;
background-color: white;
padding: 10px;
border: 1px solid #ccc;
}