327 lines
4.9 KiB
CSS
327 lines
4.9 KiB
CSS
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
|
background: #f5f5f5;
|
|
}
|
|
|
|
.container {
|
|
width: 380px;
|
|
padding: 20px;
|
|
background: white;
|
|
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
|
|
}
|
|
|
|
h1 {
|
|
font-size: 20px;
|
|
color: #333;
|
|
margin-bottom: 20px;
|
|
text-align: center;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.tab {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 5px;
|
|
margin-bottom: 20px;
|
|
background: #f5f5f5;
|
|
padding: 5px;
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.tab button {
|
|
padding: 8px 4px;
|
|
font-size: 12px;
|
|
white-space: nowrap;
|
|
min-width: 0;
|
|
border: none;
|
|
background: transparent;
|
|
color: #666;
|
|
cursor: pointer;
|
|
border-radius: 6px;
|
|
transition: all 0.3s ease;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 4px;
|
|
}
|
|
|
|
.tab button .icon {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.tab button:hover {
|
|
background: rgba(0,0,0,0.05);
|
|
}
|
|
|
|
.tab button.active {
|
|
background: #1a73e8;
|
|
color: white;
|
|
}
|
|
|
|
.input-group {
|
|
display: flex;
|
|
gap: 10px;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
input[type="text"] {
|
|
flex: 1;
|
|
padding: 12px;
|
|
border: 1px solid #ddd;
|
|
border-radius: 6px;
|
|
font-size: 14px;
|
|
transition: border-color 0.3s ease;
|
|
}
|
|
|
|
input[type="text"]:focus {
|
|
outline: none;
|
|
border-color: #1a73e8;
|
|
}
|
|
|
|
button {
|
|
padding: 12px 20px;
|
|
background: #1a73e8;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
transition: background 0.3s ease;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
button:hover {
|
|
background: #1557b0;
|
|
}
|
|
|
|
.result-container {
|
|
background: #f8f9fa;
|
|
border-radius: 8px;
|
|
padding: 20px;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
.file-upload {
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
.file-label {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
padding: 12px;
|
|
background: #f8f9fa;
|
|
border: 2px dashed #ddd;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.file-label:hover {
|
|
border-color: #1a73e8;
|
|
background: #f0f7ff;
|
|
}
|
|
|
|
.preview-container {
|
|
margin: 15px 0;
|
|
max-height: 300px;
|
|
overflow-y: auto;
|
|
padding: 15px;
|
|
background: #f8f9fa;
|
|
border-radius: 6px;
|
|
border: 1px solid #ddd;
|
|
}
|
|
|
|
.download-btn {
|
|
width: 100%;
|
|
background: #34a853;
|
|
}
|
|
|
|
.download-btn:hover {
|
|
background: #2d8a46;
|
|
}
|
|
|
|
.icon {
|
|
font-size: 18px;
|
|
}
|
|
|
|
/* 美化滚动条 */
|
|
::-webkit-scrollbar {
|
|
width: 8px;
|
|
}
|
|
|
|
::-webkit-scrollbar-track {
|
|
background: #f1f1f1;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
background: #888;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb:hover {
|
|
background: #555;
|
|
}
|
|
|
|
/* 预览区域的样式 */
|
|
#preview {
|
|
font-size: 14px;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
#preview h1, #preview h2, #preview h3 {
|
|
margin: 16px 0 8px 0;
|
|
color: #333;
|
|
}
|
|
|
|
#preview p {
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
#preview table {
|
|
border-collapse: collapse;
|
|
width: 100%;
|
|
margin: 10px 0;
|
|
}
|
|
|
|
#preview td, #preview th {
|
|
border: 1px solid #ddd;
|
|
padding: 8px;
|
|
}
|
|
|
|
#preview img {
|
|
max-width: 100%;
|
|
height: auto;
|
|
}
|
|
|
|
.status-message {
|
|
margin: 10px 0;
|
|
padding: 8px 12px;
|
|
border-radius: 6px;
|
|
font-size: 13px;
|
|
text-align: center;
|
|
}
|
|
|
|
.status-message.success {
|
|
display: block;
|
|
background-color: #e6f4ea;
|
|
color: #1e8e3e;
|
|
border: 1px solid #1e8e3e;
|
|
}
|
|
|
|
.status-message.loading {
|
|
display: block;
|
|
background-color: #e8f0fe;
|
|
color: #1a73e8;
|
|
border: 1px solid #1a73e8;
|
|
}
|
|
|
|
.status-message.error {
|
|
display: block;
|
|
background-color: #fce8e6;
|
|
color: #d93025;
|
|
border: 1px solid #d93025;
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; }
|
|
to { opacity: 1; }
|
|
}
|
|
|
|
.file-name {
|
|
max-width: 200px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
/* 添加新的样式 */
|
|
.language-select {
|
|
margin: 10px 0;
|
|
}
|
|
|
|
.language-select select {
|
|
width: 100%;
|
|
padding: 8px;
|
|
border-radius: 4px;
|
|
border: 1px solid #ccc;
|
|
}
|
|
|
|
.translate-btn {
|
|
width: 100%;
|
|
padding: 10px;
|
|
background: #4CAF50;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.translate-btn:hover {
|
|
background: #45a049;
|
|
}
|
|
|
|
/* 添加进度条样式 */
|
|
.progress-container {
|
|
margin: 15px 0;
|
|
background: #f0f0f0;
|
|
border-radius: 4px;
|
|
overflow: hidden;
|
|
height: 4px;
|
|
display: none;
|
|
}
|
|
|
|
.progress-bar {
|
|
height: 100%;
|
|
background: #1a73e8;
|
|
width: 0;
|
|
transition: width 0.3s ease;
|
|
}
|
|
|
|
/* 添加进度文本样式 */
|
|
.progress-text {
|
|
font-size: 12px;
|
|
color: #666;
|
|
text-align: center;
|
|
margin-top: 5px;
|
|
display: none;
|
|
}
|
|
|
|
/* 修改选项卡文字样式 */
|
|
.tab button[data-tab="qr"] {
|
|
font-size: 12px;
|
|
}
|
|
|
|
.tab button[data-tab="qr"]::after {
|
|
content: "二维码生成";
|
|
}
|
|
|
|
.tab button[data-tab="word"] {
|
|
font-size: 12px;
|
|
}
|
|
|
|
.tab button[data-tab="word"]::after {
|
|
content: "Word转HTML";
|
|
}
|
|
|
|
.tab button[data-tab="translate"] {
|
|
font-size: 12px;
|
|
}
|
|
|
|
.tab button[data-tab="translate"]::after {
|
|
content: "Word翻译";
|
|
} |