Files
labweb/public/css/index.css
2025-12-16 11:39:15 +08:00

1099 lines
20 KiB
CSS

.wrapper {
width: 90%;
margin: 0 auto;
box-sizing: border-box;
}
/* header */
.header {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 5% 0 2%;
gap: 20px;
}
.header .logo {
display: flex;
flex: 1 1 auto;
max-width: 55%;
min-width: 0;
align-items: center;
margin: 0;
border-radius: 20px;
font-size: 120%;
font-weight: 700;
}
.header .logo img {
height: 80px;
width: auto;
object-fit: contain;
display: block;
}
.header .logo .title {
margin-left: 2%;
width: auto;
display: flex;
flex-direction: row;
align-items: baseline;
gap: 8px;
flex-wrap: wrap;
overflow: hidden;
}
.header .logo .title h3 {
font-size: 110%;
color: #2E5A61;
font-weight: 600;
margin: 0;
white-space: normal;
line-height: 1.2;
}
.header .logo .title p {
font-size: 80%;
color: #666;
margin: 0;
white-space: normal;
line-height: 1.2;
}
.header .nev {
flex: 0 1 auto;
height: 100%;
min-width: 0;
}
.header .nev .nev-child-1 {
display: flex;
width: 100%;
height: 100%;
justify-content: flex-end;
align-items: center;
}
.header .nev-child-1 li {
padding: 1% 2%;
border-radius: 10px;
position: relative;
list-style: none;
}
/* 鼠标悬停导航栏 */
.header li:hover a {
color: black;
}
.header .icon-jiantou_shang {
display: none;
}
.header li:hover .icon-jiantou_xia {
display: none;
}
.header li:hover .icon-jiantou_shang {
display: inline-block;
}
/* 箭头图标对齐样式 */
.header .icon-jiantou_xia,
.header .icon-jiantou_shang {
font-size: 12px;
vertical-align: middle;
line-height: 1;
margin-left: 4px;
}
.header a {
font-size: 150%;
font-weight: 700;
color: #a39e9e;
display: inline-flex;
align-items: center;
gap: 5px;
}
.header .nev-child-2 {
display: none;
position: absolute;
top: 70%;
left: 50%;
transform: translateX(-50%) translateY(-10px);
background: linear-gradient(135deg, #ffffff 0%, #f8fbfc 100%);
border-radius: 12px;
box-shadow: 0 12px 35px rgba(46, 90, 97, 0.2);
border: 1px solid rgba(46, 90, 97, 0.08);
overflow: hidden;
z-index: 9999;
opacity: 0;
visibility: hidden;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
margin-top: 8px;
min-width: 200px;
}
/* 下拉菜单顶部小箭头 */
.header .nev-child-2::before {
content: '';
position: absolute;
top: -8px;
left: 50%;
transform: translateX(-50%);
width: 0;
height: 0;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
border-bottom: 8px solid #ffffff;
filter: drop-shadow(0 -2px 4px rgba(46, 90, 97, 0.1));
}
.header .nev-child-2 li {
width: 100%;
background-color: transparent;
text-align: left;
border-bottom: 1px solid rgba(46, 90, 97, 0.08);
font-weight: 400;
transition: all 0.2s ease;
}
.header .nev-child-2 li:nth-last-child(1) {
border-bottom: none;
}
.header .nev-child-2 li a {
display: flex;
align-items: center;
padding: 14px 10px;
color: #2E5A61;
text-decoration: none;
font-size: 100%;
font-weight: 500;
position: relative;
transition: all 0.2s ease;
white-space: nowrap;
}
.header .nev-child-2 li a:before {
content: '';
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 0;
z-index: -1;
}
.header .nev-child-2 li:hover {
background-color: rgba(71, 183, 190, 0.05);
transform: translateX(3px);
}
.header .nev-child-2 li:hover a {
color: #2E5A61;
}
.header .nev-child-2 li:hover a:before {
width: 4px;
}
/* 每个菜单项的特色样式 */
.header .nev-child-2 li:nth-child(1):hover {
background: linear-gradient(90deg, rgba(255, 193, 7, 0.1), transparent);
}
.header .nev-child-2 li:nth-child(2):hover {
background: linear-gradient(90deg, rgba(220, 53, 69, 0.1), transparent);
}
.header .nev-child-2 li:nth-child(3):hover {
background: linear-gradient(90deg, rgba(255, 87, 34, 0.1), transparent);
}
.header .nev-child-2 li:nth-child(4):hover {
background: linear-gradient(90deg, rgba(76, 175, 80, 0.1), transparent);
}
.header .nev-child-2 li:nth-child(5):hover {
background: linear-gradient(90deg, rgba(156, 39, 176, 0.1), transparent);
}
/* 菜单项动画序列 */
.header li:hover .nev-child-2 li {
animation: slideInFromLeft 0.3s ease forwards;
opacity: 0;
transform: translateX(-20px);
}
.header li:hover .nev-child-2 li:nth-child(1) { animation-delay: 0.1s; }
.header li:hover .nev-child-2 li:nth-child(2) { animation-delay: 0.15s; }
.header li:hover .nev-child-2 li:nth-child(3) { animation-delay: 0.2s; }
.header li:hover .nev-child-2 li:nth-child(4) { animation-delay: 0.25s; }
.header li:hover .nev-child-2 li:nth-child(5) { animation-delay: 0.3s; }
@keyframes slideInFromLeft {
to {
opacity: 1;
transform: translateX(0);
}
}
/* 下拉菜单显示动画 */
.header li:hover .nev-child-2 {
display: block;
opacity: 1;
visibility: visible;
transform: translateX(-50%) translateY(0);
}
/* content */
.content {
width: 100%;
}
.content .banner {
width: 100%;
/* background-color: #3A7D8F; */
position: relative;
overflow: hidden;
background-image: url('../assets/images/banner.png');
background-size: 100% 100%;
min-height: 550px;
background-position: center;
box-shadow: 0 8px 32px rgba(74, 144, 164, 0.3);
}
/* .content .banner::before {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 800px;
height: 800px;
background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
border-radius: 50%;
transform: translate(-50%, -50%);
pointer-events: none;
} */
/* .content .banner::after {
content: '';
position: absolute;
top: 20%;
left: 20%;
width: 300px;
height: 300px;
background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
border-radius: 50%;
pointer-events: none;
} */
.banner-content {
position: relative;
z-index: 2;
text-align: center;
max-width: 900px;
margin: 0 auto;
padding-top: 12%;
}
.banner-title {
font-size: 48px;
font-weight: 700;
color: white;
margin-bottom: 20px;
text-shadow: 0 2px 4px rgba(0,0,0,0.3);
line-height: 1.2;
}
.banner-subtitle {
font-size: 18px;
color: rgba(255,255,255,0.9);
margin-bottom: 40px;
line-height: 1.6;
max-width: 700px;
margin-left: auto;
margin-right: auto;
}
.banner-search {
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
}
.search-container {
display: flex;
align-items: center;
background: white;
border-radius: 50px;
padding: 8px 8px 8px 20px;
box-shadow: 0 4px 20px rgba(0,0,0,0.1);
width: 100%;
max-width: 600px;
transition: box-shadow 0.3s ease;
}
.search-container:focus-within {
box-shadow: 0 6px 30px rgba(0,0,0,0.15);
}
.search-container .icon-search {
color: #666;
font-size: 20px;
margin-right: 15px;
}
.search-container input {
flex: 1;
border: none;
outline: none;
font-size: 16px;
padding: 12px 0;
background: transparent;
color: #333;
}
.search-container input::placeholder {
color: #999;
}
.search-btn {
background: #6BC8D1;
color: white;
border: none;
border-radius: 40px;
padding: 12px 30px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
}
.search-btn:hover {
background: #4A90A4;
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.search-example {
color: rgba(255,255,255,0.8);
font-size: 14px;
font-style: italic;
margin-top: 5px;
}
.content .data {
display: flex;
width: 100%;
margin-top: -20px;
position: relative;
z-index: 10;
}
.data-cards {
width: 50%;
display: flex;
flex-wrap: wrap;
gap: 20px;
padding: 0;
}
.data-card {
width: calc(50% - 10px);
background: white;
border-radius: 20px;
box-shadow: 0 12px 40px rgba(0,0,0,0.15);
transition: all 0.3s ease;
overflow: hidden;
min-height: 120px;
border: 1px solid rgba(255,255,255,0.2);
backdrop-filter: blur(10px);
}
.data-card:hover {
transform: translateY(-8px);
border-color: rgba(74, 144, 164, 0.3);
}
.data-card a {
display: flex;
align-items: center;
padding: 15px 70px;
text-decoration: none;
color: inherit;
height: 100%;
}
.card-icon {
width: 64px;
height: 64px;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 20px;
flex-shrink: 0;
}
.card-icon i {
font-size: 400%;
color: #305a61;
font-weight: 500;
}
.card-content {
flex: 1;
}
.card-title {
font-size: 120%;
color: #666;
margin-bottom: 8px;
font-weight: 500;
}
.card-number {
font-size: 150%;
font-weight: 600;
color: #333;
line-height: 1;
}
.introduction {
width: 50%;
padding: 30px 20px 20px 40px;
background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(248,250,252,0.95) 100%);
border-radius: 20px;
box-shadow: 0 8px 32px rgba(0,0,0,0.1);
margin-left: 20px;
backdrop-filter: blur(10px);
border: 1px solid rgba(255,255,255,0.3);
}
.introduction p {
line-height: 1.8;
color: #2E5A61;
margin: 0;
text-align: justify;
}
.content .data_info {
width: 100%;
background-color: #f9f9f9;
border-radius: 10px;
margin-top: 20px;
/* padding-bottom: 20px; */
border: 1px solid #e0e0e0;
}
.content .data_info .title {
background-color: #2D6B7D;
box-sizing: border-box;
border-radius: 12px 12px 0 0;
padding: 10px 20px;
}
.content .data_info .title h2 {
font-size: 150%;
font-weight: 700;
color: white;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
/* copyright */
.copyright {
width: 100%;
margin: 0 auto;
margin-bottom: 20px;
}
.copyright .bottom {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
margin: 0 auto;
padding-top: 40px;
padding-bottom: 40px;
background-color: #1E3A4A;
}
.copyright .bottom p {
margin: 0 20px;
color: white;
}
/* Taxonomy 和 Physical and chemical properties 并排布局 */
.taxonomy-and-physchem {
display: flex;
width: 100%;
gap: 15px;
align-items: stretch;
margin: 20px auto;
padding: 0 20px;
flex-wrap: wrap;
}
/* Physiology 和 Growth conditions 并排布局 */
.culture-and-nutrition {
display: flex;
width: 75%;
gap: 20px;
align-items: stretch;
margin: 0 auto;
margin-top: 20px;
}
/* 所有图表容器样式 */
.taxonomy-container,
.culture-container,
.physchem-container,
.nutrition-container {
background-color: white;
border-radius: 8px;
border: 1px solid #e5e5e5;
height: 550px;
display: flex;
flex-direction: column;
flex: 1 1 400px;
width: calc(33.333% - 10px);
}
/* 确保所有图表容器的高度一致 */
.taxonomy-container .taxonomy-chart-container,
.culture-container .taxonomy-chart-container,
.nutrition-container .taxonomy-chart-container {
flex: 1;
min-height: 400px;
max-height: 500px;
overflow: hidden;
}
.physchem-container .chart-container {
flex: 1;
min-height: 400px;
max-height: 500px;
overflow: hidden;
}
.taxonomy-title {
font-size: 18px;
font-weight: 600;
color: #333;
padding: 16px 20px 8px 20px;
margin: 0;
border-bottom: 1px solid #f0f0f0;
}
.taxonomy-tabs-container {
border-bottom: 1px solid #e0e0e0;
padding: 0 20px;
}
.taxonomy-tabs {
display: flex;
gap: 0;
margin: 0;
padding: 0;
list-style: none;
flex-wrap: wrap;
}
.taxonomy-tab-item {
padding: 10px;
cursor: pointer;
border-bottom: 2px solid transparent;
color: #666;
font-weight: 400;
transition: all 0.3s ease;
position: relative;
white-space: nowrap;
}
.taxonomy-tab-item:hover {
color: #333;
background-color: #f8f9fa;
}
.taxonomy-tab-item.active {
color: #d73027;
border-bottom-color: #d73027;
font-weight: 500;
}
.taxonomy-chart-container {
position: relative;
margin: 10px 20px 0px 20px;
border-radius: 4px;
flex: 1;
}
.taxonomy-total-badge {
position: absolute;
top: 7%;
right: 8%;
background-color: white;
border: 1px solid #ddd;
border-radius: 12px;
padding: 2px 12px;
color: #666;
font-size: 90%;
font-weight: 500;
z-index: 10;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.physchem-total-badge {
position: absolute;
top: -1%;
right: 10%;
background-color: white;
border: 1px solid #ddd;
border-radius: 12px;
padding: 2px 12px;
color: #666;
font-size: 90%;
font-weight: 500;
z-index: 10;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.taxonomy-chart-content {
position: relative;
overflow-y: auto;
max-height: 85%;
padding: 10px 0;
}
.taxonomy-chart-row {
display: flex;
align-items: center;
margin-bottom: 15px;
height: 30px;
}
.taxonomy-taxa-name {
width: 30%;
font-size: 100%;
color: #333;
text-align: right;
padding-right: 15px;
font-weight: 400;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.taxonomy-chart-area {
flex: 1;
position: relative;
height: 100%;
}
.taxonomy-chart-line {
position: absolute;
height: 4px;
background-color: #ccc;
top: 50%;
transform: translateY(-50%);
left: 0;
}
.taxonomy-chart-dot {
position: absolute;
width: 15px;
height: 15px;
background-color: #CCCC99;
border-radius: 50%;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
transition: all 0.1s ease;
}
.taxonomy-chart-dot:hover {
width: 20px;
height: 20px;
background-color: #CCCC99;
}
.taxonomy-x-axis {
bottom: 0;
background-color: white;
border-top: 1px solid #e0e0e0;
overflow: hidden;
padding-left: 29%;
}
.count_x_axis {
font-size: 18px;
color: #666;
text-overflow: ellipsis;
}
.taxonomy-x-axis-labels {
display: flex;
justify-content: space-between;
width: 100%;
font-size: 90%;
color: #666;
}
.taxonomy-tooltip {
position: absolute;
background-color: #333;
color: white;
padding: 8px 12px;
border-radius: 4px;
font-size: 12px;
pointer-events: none;
z-index: 1000;
display: none;
white-space: nowrap;
}
.taxonomy-tooltip::after {
content: '';
position: absolute;
top: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: #333 transparent transparent transparent;
}
.taxonomy-grid-lines {
position: absolute;
top: 0;
left: 29%;
right: 0;
bottom: 0;
pointer-events: none;
height: 85%;
overflow: hidden;
}
.taxonomy-grid-line {
position: absolute;
width: 2px;
height: 100%;
background-color: #e8e8e8;
}
/* Physical and Chemical Properties 样式 */
.physchem-container .chart-container {
position: relative;
margin: 10px 20px 20px 20px;
border-radius: 4px;
flex: 1;
min-height: 0;
overflow: hidden;
}
.physchem-container .chart-area {
position: absolute;
top: 5%;
left: 0;
right: 0;
bottom: 0;
display: none;
width: 100%;
height: 100%;
min-height: 300px;
}
.physchem-container .chart-area.active {
display: block;
}
/* 确保ECharts图表自适应容器 */
.physchem-container .chart-area > div {
width: 100% !important;
height: 100% !important;
}
/* 防止图表悬浮时的布局溢出 */
.physchem-container .chart-area {
overflow: hidden;
}
/* 确保饼图容器稳定显示 */
#chart-oxygen-pie {
position: relative;
width: 100%;
height: 100%;
}
/* 防止ECharts悬浮效果引起的布局偏移 */
.physchem-container .chart-area > div > div {
position: relative !important;
}
/* Nutrition 样式复用 taxonomy 样式 */
.nutrition-chart-row {
display: flex;
align-items: center;
margin-bottom: 15px;
height: 30px;
}
.nutrition-taxa-name {
width: 25%;
font-size: 100%;
color: #333;
text-align: right;
padding-right: 15px;
font-weight: 400;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.nutrition-chart-area {
flex: 1;
position: relative;
height: 100%;
}
.nutrition-chart-line {
position: absolute;
height: 4px;
background-color: #ccc;
top: 50%;
transform: translateY(-50%);
left: 0;
}
.nutrition-chart-dot {
position: absolute;
width: 15px;
height: 15px;
background-color: #CCCC99;
border-radius: 50%;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
transition: all 0.1s ease;
}
.nutrition-chart-dot:hover {
width: 20px;
height: 20px;
background-color: #CCCC99;
}
.nutrition-grid-lines {
position: absolute;
top: 0;
left: 24%;
right: 0;
bottom: 0;
pointer-events: none;
height: 85%;
overflow: hidden;
}
.nutrition-grid-line {
position: absolute;
width: 1px;
height: 100%;
background-color: #e8e8e8;
}
.nutrition-x-axis-labels,
.culture-x-axis-labels {
display: flex;
justify-content: space-between;
width: 100%;
font-size: 90%;
color: #666;
}
/* Culture Medium 样式复用 nutrition 样式 */
.culture-chart-row {
display: flex;
align-items: center;
margin-bottom: 15px;
height: 30px;
}
.culture-taxa-name {
width: 150px;
font-size: 12px;
color: #333;
text-align: right;
padding-right: 15px;
font-weight: 400;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.culture-chart-area {
flex: 1;
position: relative;
height: 100%;
}
.culture-chart-line {
position: absolute;
height: 2px;
background-color: #ccc;
top: 50%;
transform: translateY(-50%);
left: 0;
}
.culture-chart-dot {
position: absolute;
width: 8px;
height: 8px;
background-color: #6BC8D1;
border-radius: 50%;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
transition: all 0.1s ease;
}
.culture-chart-dot:hover {
width: 15px;
height: 15px;
background-color: #6BC8D1;
}
.culture-grid-lines {
position: absolute;
top: 0;
left: 150px;
right: 0;
bottom: 0;
pointer-events: none;
height: 90%;
overflow: hidden;
}
.culture-grid-line {
position: absolute;
width: 1px;
height: 100%;
background-color: #e8e8e8;
}
/* Tools 区域样式 */
.tools-section {
width: 100%;
margin-top: 20px;
margin-bottom: 20px;
}
.tools-header {
/* background: linear-gradient(135deg, #4A90A4, #6BC8D1); */
background-color: #2D6B7D;
padding: 10px 20px;
border-radius: 12px 12px 0 0;
margin-bottom: 0;
}
.tools-header h2 {
color: white;
font-size: 150%;
font-weight: 700;
margin: 0;
text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.tools-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 0;
background: white;
border-radius: 0 0 12px 12px;
box-shadow: 0 8px 32px rgba(0,0,0,0.1);
overflow: hidden;
}
.tool-card {
display: flex;
align-items: flex-start;
padding: 30px;
border-bottom: 1px solid #f0f0f0;
border-right: 1px solid #f0f0f0;
transition: all 0.3s ease;
background: white;
}
.tool-card:nth-child(2n) {
border-right: none;
}
.tool-card:nth-last-child(-n+2) {
border-bottom: none;
}
.tool-card:nth-child(5) {
border-right: none;
border-bottom: none;
grid-column: 1 / -1;
justify-content: center;
}
.tool-card:hover {
background: #f8fffe;
transform: translateY(-2px);
box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.tool-icon {
width: 80px;
height: 80px;
border: 1px solid #e0e0e0;
border-radius: 16px;
/* background: linear-gradient(135deg, #47b7be, #2E5A61); */
display: flex;
align-items: center;
justify-content: center;
margin-right: 24px;
flex-shrink: 0;
/* box-shadow: 0 4px 16px rgba(71, 183, 190, 0.3); */
}
.tool-icon i {
font-size: 300%;
}
.tool-content {
flex: 1;
}
.tool-title {
font-size: 130%;
font-weight: 700;
color: #4A90A4;
margin: 0 0 12px 0;
line-height: 1.3;
}
.tool-description {
font-size: 110%;
color: #666;
line-height: 1.6;
margin: 0;
}