Files
pdf-translate-web/static/css/style.css
coder be1e01a8c6 初始提交: PDF翻译网站
功能:
- 上传PDF自动翻译成中文
- 不登录可用(次数限制)
- 登录后获得更多次数
- 会员等级制度(不同权益)
- 智能缓存(相同文件秒出结果)
- 原文译文对比查看
- 支持重新翻译(自定义要求)
- 翻译历史记录

技术栈: Flask + SQLAlchemy + Bootstrap5
2026-04-07 19:01:14 +08:00

176 lines
3.0 KiB
CSS

/* PDF翻译助手样式 */
:root {
--primary-color: #4a90d9;
--secondary-color: #f8f9fa;
--success-color: #28a745;
--warning-color: #ffc107;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
background-color: var(--secondary-color);
}
.navbar-brand {
font-weight: bold;
}
/* 卡片样式 */
.card {
border-radius: 10px;
border: none;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.card-header {
border-radius: 10px 10px 0 0 !important;
}
/* 上传区域 */
#uploadForm {
padding: 20px;
}
.form-control:focus {
border-color: var(--primary-color);
box-shadow: 0 0 0 0.2rem rgba(74, 144, 217, 0.25);
}
/* 进度条 */
.progress {
height: 25px;
border-radius: 5px;
}
.progress-bar {
background-color: var(--primary-color);
transition: width 0.3s ease;
}
/* 翻译内容 */
.translation-content {
max-height: 600px;
overflow-y: auto;
padding: 20px;
background-color: #fff;
border-radius: 5px;
border: 1px solid #dee2e6;
line-height: 1.8;
}
.translation-content h2 {
color: var(--primary-color);
margin-top: 20px;
border-bottom: 2px solid var(--primary-color);
padding-bottom: 10px;
}
.translation-content hr {
margin: 30px 0;
}
/* 对比视图 */
.compare-container {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
}
.compare-panel {
padding: 15px;
border-radius: 5px;
background-color: #f8f9fa;
}
.compare-panel.original {
border-left: 4px solid #dc3545;
}
.compare-panel.translated {
border-left: 4px solid var(--success-color);
}
/* 会员卡片 */
.pricing-card {
transition: transform 0.3s ease;
}
.pricing-card:hover {
transform: translateY(-5px);
}
.pricing-card .price {
font-size: 2.5rem;
font-weight: bold;
color: var(--primary-color);
}
.pricing-card .features {
list-style: none;
padding: 0;
}
.pricing-card .features li {
padding: 10px 0;
border-bottom: 1px solid #eee;
}
/* 按钮 */
.btn-primary {
background-color: var(--primary-color);
border-color: var(--primary-color);
}
.btn-primary:hover {
background-color: #3a7bc8;
border-color: #3a7bc8;
}
/* 响应式 */
@media (max-width: 768px) {
.compare-container {
grid-template-columns: 1fr;
}
.translation-content {
max-height: 400px;
}
}
/* 加载动画 */
.loading-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.8);
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
}
/* 历史记录 */
.history-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px;
border-bottom: 1px solid #eee;
}
.history-item:hover {
background-color: #f8f9fa;
}
/* 登录注册表单 */
.auth-form {
max-width: 400px;
margin: 50px auto;
padding: 30px;
background: white;
border-radius: 10px;
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}