ai-image-generator/styles.css
skylarGW 88f89e7742
Add files via upload
初始版本:AI图片生成器
2025-08-09 20:27:03 +08:00

216 lines
3.8 KiB
CSS

/* 全局样式 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
color: #333;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
/* 头部样式 */
header {
text-align: center;
margin-bottom: 40px;
color: white;
}
header h1 {
font-size: 2.5rem;
margin-bottom: 10px;
text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}
header p {
font-size: 1.2rem;
opacity: 0.9;
}
/* 表单容器 */
.form-container {
background: white;
border-radius: 15px;
padding: 30px;
box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
/* 表单区块 */
.form-section {
margin-bottom: 30px;
padding-bottom: 20px;
border-bottom: 1px solid #eee;
}
.form-section:last-of-type {
border-bottom: none;
}
.form-section h2 {
color: #4a5568;
margin-bottom: 20px;
font-size: 1.3rem;
display: flex;
align-items: center;
gap: 8px;
}
/* 输入组样式 */
.input-group {
margin-bottom: 15px;
}
.input-group label {
display: block;
margin-bottom: 5px;
font-weight: 600;
color: #2d3748;
}
.input-group input,
.input-group select,
.input-group textarea {
width: 100%;
padding: 12px;
border: 2px solid #e2e8f0;
border-radius: 8px;
font-size: 16px;
transition: border-color 0.3s ease;
}
.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
/* 复选框组 */
.checkbox-group {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 10px;
}
.checkbox-group label {
display: flex;
align-items: center;
gap: 8px;
padding: 10px;
background: #f7fafc;
border-radius: 6px;
cursor: pointer;
transition: background-color 0.2s ease;
}
.checkbox-group label:hover {
background: #edf2f7;
}
.checkbox-group input[type="checkbox"] {
width: auto;
margin: 0;
}
/* 上传组样式 */
.upload-group {
margin-bottom: 20px;
}
.upload-group label {
display: block;
margin-bottom: 8px;
font-weight: 600;
color: #2d3748;
}
.upload-group input[type="file"] {
width: 100%;
padding: 12px;
border: 2px dashed #cbd5e0;
border-radius: 8px;
background: #f7fafc;
cursor: pointer;
transition: all 0.3s ease;
}
.upload-group input[type="file"]:hover {
border-color: #667eea;
background: #edf2f7;
}
.upload-group small {
display: block;
margin-top: 5px;
color: #718096;
font-size: 0.9rem;
}
/* 提交按钮 */
.submit-btn {
width: 100%;
padding: 15px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
border-radius: 10px;
font-size: 1.1rem;
font-weight: 600;
cursor: pointer;
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.submit-btn:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}
.submit-btn:active {
transform: translateY(0);
}
/* 响应式设计 */
@media (max-width: 768px) {
.container {
padding: 10px;
}
header h1 {
font-size: 2rem;
}
.form-container {
padding: 20px;
}
.checkbox-group {
grid-template-columns: 1fr;
}
}
/* 加载动画 */
.loading {
display: inline-block;
width: 20px;
height: 20px;
border: 3px solid #f3f3f3;
border-top: 3px solid #667eea;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}