400 lines
6.9 KiB
CSS
400 lines
6.9 KiB
CSS
:root {
|
|
--primary-color: #4CAF50;
|
|
--primary-dark: #45a049;
|
|
--secondary-color: #2c3e50;
|
|
--light-gray: #f5f5f5;
|
|
--card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
--hover-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
--border-color: #e0e0e0;
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
body {
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
line-height: 1.6;
|
|
margin: 0;
|
|
padding: 0;
|
|
background-color: var(--light-gray);
|
|
color: #333;
|
|
}
|
|
|
|
.content-container {
|
|
background-color: white;
|
|
padding: 30px;
|
|
border-radius: 8px;
|
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
|
width: 90%;
|
|
max-width: 1000px;
|
|
margin: 20px auto;
|
|
}
|
|
|
|
h1 {
|
|
text-align: center;
|
|
color: var(--secondary-color);
|
|
margin-bottom: 20px;
|
|
font-size: 2rem;
|
|
}
|
|
|
|
p {
|
|
margin: 15px 0;
|
|
}
|
|
|
|
.formula {
|
|
margin: 20px 0;
|
|
padding: 15px;
|
|
background-color: #f9f9f9;
|
|
border-radius: 4px;
|
|
border-left: 4px solid var(--primary-color);
|
|
}
|
|
|
|
button {
|
|
background-color: var(--primary-color);
|
|
color: white;
|
|
padding: 10px 20px;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 16px;
|
|
margin: 10px 0;
|
|
transition: background-color 0.3s, transform 0.2s;
|
|
}
|
|
|
|
button:hover {
|
|
background-color: var(--primary-dark);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
button:active {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.container {
|
|
max-width: 100%;
|
|
margin: 30px auto 0;
|
|
background-color: white;
|
|
border-radius: 8px;
|
|
box-shadow: var(--card-shadow);
|
|
padding: 20px;
|
|
}
|
|
|
|
.card-container {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
|
gap: 20px;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
.card {
|
|
background-color: white;
|
|
border-radius: 8px;
|
|
box-shadow: var(--card-shadow);
|
|
padding: 20px;
|
|
transition: transform 0.3s, box-shadow 0.3s;
|
|
border: 1px solid var(--border-color);
|
|
position: relative;
|
|
}
|
|
|
|
.card:hover {
|
|
transform: translateY(-5px);
|
|
box-shadow: var(--hover-shadow);
|
|
}
|
|
|
|
.card.selected {
|
|
border: 2px solid var(--primary-color);
|
|
background-color: #f0f9f0;
|
|
}
|
|
|
|
.card-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
.card-title {
|
|
font-weight: 600;
|
|
color: var(--secondary-color);
|
|
margin: 0;
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
.card-date {
|
|
color: #7f8c8d;
|
|
font-size: 0.9em;
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.notification {
|
|
position: fixed;
|
|
bottom: 20px;
|
|
right: 20px;
|
|
background-color: var(--primary-color);
|
|
color: white;
|
|
padding: 15px 25px;
|
|
border-radius: 4px;
|
|
display: none;
|
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
|
|
z-index: 1000;
|
|
animation: slideIn 0.3s forwards;
|
|
}
|
|
|
|
@keyframes slideIn {
|
|
from {
|
|
transform: translateX(100%);
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
transform: translateX(0);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
#detailsContainer {
|
|
margin-top: 30px;
|
|
padding: 20px;
|
|
background-color: #f9f9f9;
|
|
border-radius: 8px;
|
|
display: none;
|
|
border-left: 4px solid var(--primary-color);
|
|
}
|
|
|
|
#detailsTable {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
margin-top: 15px;
|
|
}
|
|
|
|
#detailsTable th, #detailsTable td {
|
|
padding: 12px 15px;
|
|
text-align: left;
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
#detailsTable th {
|
|
background-color: #f2f2f2;
|
|
font-weight: 600;
|
|
color: var(--secondary-color);
|
|
}
|
|
|
|
#detailsTable tr:last-child td {
|
|
border-bottom: none;
|
|
}
|
|
|
|
/* 响应式设计 */
|
|
@media (max-width: 768px) {
|
|
body {
|
|
padding: 15px;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 1.8rem;
|
|
}
|
|
|
|
p {
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.formula-container {
|
|
padding: 15px;
|
|
}
|
|
|
|
#downloadBtn {
|
|
padding: 10px 20px;
|
|
font-size: 0.9rem;
|
|
}
|
|
}
|
|
|
|
/* 针对手机小屏幕的额外优化 */
|
|
@media (max-width: 480px) {
|
|
body {
|
|
font-size: calc(var(--base-font-size) + 2px); /* 增加基础字体大小 */
|
|
}
|
|
|
|
h1 {
|
|
font-size: 1.6rem;
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
p {
|
|
font-size: 1.1rem;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.formula-container {
|
|
padding: 15px;
|
|
margin: 15px 0;
|
|
}
|
|
|
|
.independent-formula {
|
|
font-size: 1.1rem;
|
|
}
|
|
|
|
#downloadBtn {
|
|
width: 100%;
|
|
padding: 12px;
|
|
font-size: 1rem;
|
|
}
|
|
}
|
|
|
|
/* 非常小的屏幕,如某些手机型号 */
|
|
@media (max-width: 320px) {
|
|
body {
|
|
font-size: calc(var(--base-font-size) + 3px); /* 进一步增加字体大小 */
|
|
}
|
|
|
|
h1 {
|
|
font-size: 1.4rem;
|
|
}
|
|
|
|
p {
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.formula-container {
|
|
padding: 10px;
|
|
}
|
|
}
|
|
|
|
.accordion {
|
|
width: 100%;
|
|
max-width: 600px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.accordion-item {
|
|
margin-bottom: 10px;
|
|
border: 1px solid #ccc;
|
|
border-radius: 5px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.accordion-header {
|
|
background-color: #f1f1f1;
|
|
padding: 15px;
|
|
cursor: pointer;
|
|
transition: background-color 0.3s;
|
|
}
|
|
|
|
.accordion-header:hover {
|
|
background-color: #ddd;
|
|
}
|
|
|
|
.accordion-content {
|
|
max-height: 0;
|
|
overflow: hidden;
|
|
transition: max-height 0.3s ease-out;
|
|
background-color: #fff;
|
|
padding: 0 15px;
|
|
}
|
|
|
|
.accordion-content p {
|
|
padding: 15px 0;
|
|
}
|
|
|
|
|
|
.pagination {
|
|
margin-top: 20px;
|
|
text-align: center;
|
|
}
|
|
.pagination a {
|
|
margin: 0 10px;
|
|
text-decoration: none;
|
|
color: #0066cc;
|
|
}
|
|
.pagination span {
|
|
margin: 0 10px;
|
|
}
|
|
|
|
|
|
.formula {
|
|
background-color: #f8f9fa;
|
|
padding: 15px;
|
|
border-radius: 5px;
|
|
margin: 20px 0;
|
|
border-left: 4px solid #3498db;
|
|
}
|
|
.parameter {
|
|
margin: 5px 0;
|
|
padding: 5px 10px;
|
|
background-color: #eaf2f8;
|
|
border-radius: 3px;
|
|
}
|
|
.parameter strong {
|
|
color: #2980b9;
|
|
}
|
|
|
|
footer {
|
|
background-color: #f1f1f1;
|
|
padding: 10px 20px;
|
|
text-align: center;
|
|
position: relative;
|
|
bottom: 0;
|
|
width: 100%;
|
|
}
|
|
|
|
.version {
|
|
font-size: 14px;
|
|
color: #666;
|
|
}
|
|
|
|
#deleteBtn {
|
|
background-color: #f44336;
|
|
color: white;
|
|
padding: 10px 20px;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 16px;
|
|
margin: 10px 0 10px 10px;
|
|
transition: background-color 0.3s, transform 0.2s;
|
|
}
|
|
|
|
#deleteBtn:hover {
|
|
background-color: #d32f2f;
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
#deleteBtn:active {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.pagination {
|
|
margin-top: 20px;
|
|
text-align: center;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
gap: 15px;
|
|
}
|
|
|
|
.pagination button {
|
|
background-color: var(--primary-color);
|
|
color: white;
|
|
padding: 8px 16px;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
transition: background-color 0.3s;
|
|
}
|
|
|
|
.pagination button:hover:not(:disabled) {
|
|
background-color: var(--primary-dark);
|
|
}
|
|
|
|
.pagination button:disabled {
|
|
background-color: #cccccc;
|
|
cursor: not-allowed;
|
|
opacity: 0.6;
|
|
}
|
|
|
|
.pagination span {
|
|
margin: 0 10px;
|
|
font-size: 14px;
|
|
}
|