KunWeb/web/css/index.css
2026-04-15 19:12:35 +08:00

654 lines
13 KiB
CSS
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* Banner样式 */
.banner {
position: relative;
width: 100%;
height: 600px;
background:
linear-gradient(135deg, rgba(232, 237, 243, 0.3), rgba(240, 244, 249, 0.3)),
url("../images/IMUT_day.jpg") no-repeat center center;
background-size: cover;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
overflow: hidden;
}
/* 隐藏原背景图片 */
.banner-img {
display: none;
}
.banner-text {
z-index: 2;
position: relative; /* 确保层级高于背景图 */
}
.banner-text h1 {
font-size: 42px;
font-weight: 700;
color: #1d2129;
margin-bottom: 16px;
text-shadow: 0 1px 3px rgba(0,0,0,0.1); /* 轻微阴影增强可读性 */
}
.banner-text p {
font-size: 18px;
color: #4e5969;
margin-bottom: 32px;
}
/* 按钮组改为链接组样式 */
.banner-btn-group {
display: flex;
margin-left: 40px;
gap: 20px;
}
/* 核心:链接样式 */
.banner-link {
padding: 10px 24px;
border-radius: 4px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
text-decoration: none; /* 去除链接下划线 */
display: inline-block; /* 保证padding生效 */
transition: all 0.3s ease;
}
.banner-link.primary {
background-color: #165dff;
color: #fff !important; /* 强制白色,避免继承链接颜色 */
text-align: center;
}
.banner-link.primary:hover {
background-color: #0d47a1;
text-decoration: none; /* hover时也无下划线 */
}
.banner-link.secondary {
background-color: #fff;
color: #165dff !important;
border: 1px solid #165dff;
}
body.night-mode .feature-section {
background-color: #1d2129;
}
body.night-mode .feature-section .section-title h2 {
color: #fff;
}
body.night-mode .feature-card {
background-color: #2c3036;
color: #e5e6eb;
}
body.night-mode .feature-card h3 {
color: #4d88ff;
}
body.night-mode .feature-card p {
color: #c0c4cc;
}
body.night-mode .feature-card:hover {
box-shadow: 0 4px 12px rgba(77, 136, 255, 0.15);
}
.banner-link.secondary:hover {
background-color: #f0f5ff;
text-decoration: none;
}
/* 板块通用标题 - 提升层级,适配业务范围背景图 */
.section-title {
text-align: center;
margin-bottom: 0;
padding-top: 20px;
position: relative;
z-index: 10; /* 关键:让标题层级高于背景图 */
}
.section-title h2 {
font-size: 28px;
color: black;
margin-bottom: 8px;
display: inline-block;
border-bottom: 2px solid #165DFF;
padding-bottom: 6px;
/*background: rgba(255,255,255,0.8); 白天标题加浅背景,更醒目 */
padding: 0 20px 6px;
border-radius: 4px 4px 0 0;
}
/* 夜晚板块标题 */
body.night-mode .section-title h2 {
font-size: 28px;
color: #fff;
margin-bottom: 8px;
display: inline-block;
border-bottom: 2px solid #fff;
padding-bottom: 6px;
/*background: rgba(29,33,41,0.8); 夜间标题加深色背景,更醒目 */
}
/* 板块1产研学用融合模式 */
.feature-section {
padding: 60px 0;
background-color: #fff;
}
.feature-section .section-title {
text-align: center;
margin-bottom: 40px;
}
.feature-section .section-title h2 {
font-size: 28px;
font-weight: 700;
color: #1d2129;
}
.feature-container {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 24px; /* 原24px → 缩小间距,减少空白 */
max-width: 1200px;
margin: 0 auto;
padding: 0 24px;
}
.feature-card {
background-color: #f7f8fa;
padding: 28px 20px; /* 原24px → 适度放大但减少冗余内边距 */
border-radius: 8px;
/* 移除scale缩放避免额外空白保留hover阴影 */
transition: box-shadow 0.3s ease;
}
/* 隐藏原卡片图片 */
.feature-card .feature-img {
display: none;
}
.feature-card h3 {
font-size: 22px; /* 原20px → 放大标题 */
font-weight: 600;
color: #165dff;
margin-bottom: 10px; /* 原12px → 缩小间距,减少空白 */
line-height: 1.2; /* 紧凑行高 */
}
.feature-card p {
font-size: 15px; /* 原14px → 放大正文 */
color: #4e5969;
line-height: 1.6;
margin: 0; /* 移除默认margin减少空白 */
}
/* hover效果仅阴影无缩放避免空白 */
.feature-card:hover {
box-shadow: 0 4px 12px rgba(22, 93, 255, 0.1);
}
/* 板块2业务范围*/
.business-section {
margin-bottom: 80px;
/* background-color: #abb3c7; */
color: #fff;
border-radius: 8px;
padding: 0;
min-height: 300px;
position: relative;
overflow: hidden;
display: flex;
justify-content: center;
}
/* 业务范围背景图 */
.business-section .bg-img {
width: 100%;
max-width: 1200px;
height: 100%;
object-fit: cover;
object-position: center;
position: absolute;
border-radius: 8px;
top: 0;
left: 50%;
transform: translateX(-50%);
z-index: 1;
opacity: 0.25; /* 深色图保持稍高透明度,保留科技感 */
transition: opacity 0.5s ease-in-out;
}
/* 夜间模式背景图透明度 */
body.night-mode .business-section .bg-img {
opacity: 0.6;
}
.business-section .container {
width: 100%;
max-width: 1200px;
min-height: 500px;
position: relative;
z-index: 5;
padding: 20px;
}
.business-content-title {
font-size: 24px;
margin-bottom: 20px;
color: #000000; /* 纯黑,保证最高对比度 */
text-shadow: 0 2px 6px rgba(255, 255, 255, 0.9); /* 白色柔光,让文字从背景里跳出来 */
font-weight: 700;
}
.business-content-desc {
font-size: 18px;
max-width: 800px;
line-height: 1.8;
color: #1d2129; /* 深灰,比纯黑柔和一点 */
text-shadow: 0 1px 4px rgba(255, 255, 255, 0.8);
}
.business-card-group {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 10px;
position: absolute;
bottom: 0;
left: 0;
width: 100%;
padding: 20px 20px 0 20px;
z-index: 6;
}
.business-card {
background-color: #e8edf3;
color: #1d2129;
height: 100px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
cursor: pointer;
position: relative;
clip-path: polygon(
10% 0,
90% 0,
100% 15%,
100% 85%,
90% 100%,
10% 100%,
0 85%,
0 15%
);
border-radius: 12px;
transition: all 0.3s ease;
padding: 10px 10px 0 10px;
overflow: hidden;
}
/* 白天 hover 颜色(更浅、更干净) */
.business-card:hover {
background-color: #f0f4fa;
transform: translateY(-5px);
box-shadow: 0 8px 16px rgba(0,0,0,0.08);
}
/* 夜间模式卡片 */
body.night-mode .business-card {
background-color: #2c3036;
color: #e5e6eb;
}
/* 夜间模式 hover */
body.night-mode .business-card:hover {
background-color: #3b3f46;
box-shadow: 0 8px 16px rgba(0,0,0,0.25);
}
.business-card h3 {
font-size: 18px;
margin-bottom: 8px;
font-weight: 600;
/* 确保文字居中不被切角遮挡 */
position: relative;
z-index: 1;
}
.business-card a {
font-size: 14px;
color: #165DFF;
}
.business-card a:hover {
text-decoration: underline;
}
/* 板块3团体活动照片墙 */
.activity-section {
margin-bottom: 80px;
}
.photo-wall {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 16px;
margin-bottom: 24px;
}
.photo-item {
border-radius: 8px;
overflow: hidden;
height: 200px;
position: relative;
}
.photo-item img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.3s;
}
.photo-item:hover img {
transform: scale(1.05);
}
.photo-desc {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
background: linear-gradient(transparent, rgba(0,0,0,0.6));
color: #fff; /* 照片描述固定白色 */
padding: 12px;
font-size: 14px;
text-align: center;
}
/* 板块4三大列表+在线咨询 */
.list-section {
margin-bottom: 80px;
}
.list-container {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 24px;
position: relative;
}
/* 板块4三大列表+在线咨询 */
.list-section {
margin-bottom: 80px;
}
.list-container {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 24px;
position: relative;
}
.list-card {
background: #fff;
border-radius: 8px;
box-shadow: 0 2px 12px rgba(22,93,255,0.08);
padding: 24px;
transition: background-color 0.3s, box-shadow 0.3s;
}
/* 行业观察列表*/
.list-card--weak {
background: #FAFBFC;
box-shadow: 0 1px 4px rgba(0,0,0,0.05);
border: 1px solid #F2F3F5;
}
.list-card--weak h3 {
color: #333;
}
.list-card--weak .list-item a {
color: #6E7681;
}
.list-card--weak:hover {
box-shadow: 0 2px 8px rgba(22,93,255,0.06);
background: #fff;
}
/* 夜间模式 */
body.night-mode .list-card--weak {
background: #24272B;
box-shadow: 0 1px 4px rgba(0,0,0,0.2);
border-color: #373B41;
}
body.night-mode .list-card--weak h3 {
color: #C0C4CC;
}
body.night-mode .list-card--weak .list-item a {
color: #86909C;
}
body.night-mode .list-card--weak:hover {
background: #2C3036;
box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
body.night-mode .list-card {
background-color: #2C3036;
box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.list-card h3 {
font-size: 18px;
color: #000;
margin-bottom: 16px;
display: flex;
align-items: center;
}
body.night-mode .list-card h3 {
color: #fff;
}
.list-item {
margin-bottom: 12px;
padding-bottom: 12px;
border-bottom: 1px solid #F2F3F5;
}
body.night-mode .list-item {
border-bottom-color: #373B41;
}
.list-item:last-child {
border-bottom: none;
margin-bottom: 0;
padding-bottom: 0;
}
.list-item a {
font-size: 14px;
color: #4E5969; /* 白天列表链接:深灰 */
transition: color 0.3s;
}
body.night-mode .list-item a {
color: #E5E6EB; /* 夜间列表链接:浅白 */
}
.list-item a:hover {
color: #165DFF; /* 悬停品牌蓝不变 */
}
/* 固定在线咨询入口 */
.consult-fixed {
position: fixed;
right: 30px;
bottom: 30px;
background-color: #165DFF;
color: #fff;
width: 60px;
height: 60px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4px 16px rgba(22,93,255,0.2);
cursor: pointer;
z-index: 998;
transition: all 0.3s;
}
.consult-fixed:hover {
transform: scale(1.1);
box-shadow: 0 6px 20px rgba(22,93,255,0.3);
}
.consult-fixed span {
font-size: 24px;
}
@media (max-width: 767px) {
/* ========== 移动端 Banner 优化 ========== */
.banner {
height: clamp(500px, 90vh, 650px);
padding: 0 20px;
background-position: center top;
background-size: cover;
}
.banner-text h1 {
font-size: clamp(26px, 7vw, 36px);
line-height: 1.3;
margin-bottom: 16px;
}
.banner-text p {
font-size: clamp(15px, 4vw, 20px);
line-height: 1.5;
margin-bottom: 30px;
}
.banner-btn-group {
flex-direction: column;
gap: 14px;
width: 100%;
max-width: 320px;
margin: 0 auto;
}
.banner-link {
width: 100%;
padding: 14px 0;
font-size: 16px;
}
.feature-container {
grid-template-columns: 1fr;
gap: 16px;
padding: 0 16px;
}
.feature-card {
padding: 22px 18px;
}
.feature-card h3 {
font-size: 20px;
}
.feature-card p {
font-size: 15px;
}
.business-section {
margin-bottom: 40px;
}
.business-section .container {
min-height: auto;
padding: 15px;
position: relative;
padding-bottom: 180px !important; /* 给底部卡片留出足够空间 */
}
.business-content {
padding: 20px 10px;
min-height: auto;
display: block;
}
.business-content-title {
font-size: 20px;
line-height: 1.4;
margin-bottom: 12px;
word-break: break-all;
}
.business-content-desc {
font-size: 15px;
line-height: 1.6;
word-break: break-all;
}
/* 👇 核心:卡片固定在板块底部,不飘、不遮挡 */
.business-card-group {
position: absolute;
left: 0;
bottom: 15px;
width: 100%;
grid-template-columns: repeat(2, 1fr);
gap: 8px;
padding: 0 12px;
z-index: 6;
}
.business-card {
height: 85px;
padding: 8px;
clip-path: polygon(8% 0, 92% 0, 100% 12%, 100% 88%, 92% 100%, 8% 100%, 0 88%, 0 12%);
}
.business-card h3 {
font-size: 14px;
line-height: 1.3;
text-align: center;
padding: 0 4px;
}
.activity-section {
margin-bottom: 50px;
}
.photo-wall {
grid-template-columns: repeat(2, 1fr);
gap: 12px;
padding: 0 16px;
}
.photo-item {
height: 160px;
}
.photo-desc {
font-size: 13px;
padding: 10px 6px;
}
.list-section {
margin-bottom: 60px;
}
.list-container {
grid-template-columns: 1fr;
gap: 16px;
padding: 0 16px;
}
.list-card {
padding: 20px;
}
.list-card h3 {
font-size: 17px;
}
.list-item a {
font-size: 15px;
}
.consult-fixed {
width: 55px;
height: 55px;
right: 20px;
bottom: 20px;
}
.section-title h2 {
font-size: 24px;
}
.container {
padding: 0 10px;
}
}