forked from yilv/mstech_website
348 lines
6.3 KiB
CSS
348 lines
6.3 KiB
CSS
/* === CSS Variables === */
|
|
:root {
|
|
--primary-color: #1e3799;
|
|
--secondary-color: #4a69bd;
|
|
--accent-color: #6c5ce7;
|
|
--text-color: #ffffff;
|
|
--background-color: #f8f9fa;
|
|
}
|
|
|
|
/* === Base Styles === */
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
font-family: 'Segoe UI', sans-serif;
|
|
}
|
|
|
|
html {
|
|
scroll-behavior: smooth;
|
|
visibility: hidden; /* 防止FOUC */
|
|
}
|
|
|
|
body {
|
|
background-color: var(--background-color);
|
|
padding-top: 70px;
|
|
min-height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
/* === Navigation === */
|
|
nav {
|
|
position: fixed;
|
|
top: 0;
|
|
width: 100%;
|
|
z-index: 1000;
|
|
background: rgba(30, 55, 153, 0.95);
|
|
padding: 1rem 5%;
|
|
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
|
|
.nav-scrolled {
|
|
background: var(--primary-color) !important;
|
|
padding: 0.8rem 5%;
|
|
box-shadow: 0 4px 15px rgba(0,0,0,0.2);
|
|
}
|
|
|
|
.nav-container {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.logo {
|
|
color: var(--text-color);
|
|
font-size: 1.8rem;
|
|
font-weight: 700;
|
|
text-decoration: none;
|
|
transition: transform 0.3s ease;
|
|
}
|
|
|
|
.logo:hover {
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.nav-links {
|
|
display: flex;
|
|
gap: 2rem;
|
|
list-style: none;
|
|
}
|
|
|
|
.nav-links a {
|
|
color: var(--text-color);
|
|
text-decoration: none;
|
|
font-weight: 500;
|
|
padding: 0.5rem 1rem;
|
|
border-radius: 4px;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.nav-links a:hover {
|
|
background: rgba(255,255,255,0.1);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
/* === Slideshow === */
|
|
.slideshow-container {
|
|
height: 100vh;
|
|
position: relative;
|
|
overflow: hidden;
|
|
margin-top: -70px;
|
|
}
|
|
|
|
.slide {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
opacity: 0;
|
|
transition: opacity 1s ease-in-out;
|
|
background-size: cover;
|
|
background-position: center;
|
|
animation: kenburns 20s infinite;
|
|
}
|
|
|
|
@keyframes kenburns {
|
|
0% { transform: scale(1); }
|
|
50% { transform: scale(1.05); }
|
|
100% { transform: scale(1); }
|
|
}
|
|
|
|
.slide.active {
|
|
opacity: 1;
|
|
}
|
|
|
|
.slideshow-container::after {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: linear-gradient(
|
|
45deg,
|
|
rgba(30, 55, 153, 0.7) 0%,
|
|
rgba(78, 105, 189, 0.3) 100%
|
|
);
|
|
z-index: 1;
|
|
}
|
|
|
|
/* === Loading Spinner === */
|
|
.loading-spinner {
|
|
position: fixed;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
width: 50px;
|
|
height: 50px;
|
|
border: 5px solid rgba(255,255,255,0.3);
|
|
border-top-color: var(--text-color);
|
|
border-radius: 50%;
|
|
animation: spin 1s linear infinite;
|
|
z-index: 2000;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to { transform: translate(-50%, -50%) rotate(360deg); }
|
|
}
|
|
|
|
/* === Slide-up Content === */
|
|
.slide-up-content {
|
|
transform: translateY(100%);
|
|
opacity: 0;
|
|
transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
|
|
padding: 6rem 5%;
|
|
background: white;
|
|
box-shadow: 0 -4px 30px rgba(0,0,0,0.1);
|
|
position: relative;
|
|
z-index: 100;
|
|
border-radius: 30px 30px 0 0;
|
|
margin-top: -150px;
|
|
}
|
|
|
|
.slide-up-content.active {
|
|
transform: translateY(0);
|
|
opacity: 1;
|
|
}
|
|
|
|
/* === Three Columns === */
|
|
.three-columns {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 3rem;
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.column {
|
|
padding: 2.5rem;
|
|
background: white;
|
|
border-radius: 15px;
|
|
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
|
|
box-shadow: 0 5px 25px rgba(0,0,0,0.08);
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.column::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: -50%;
|
|
left: -50%;
|
|
width: 200%;
|
|
height: 200%;
|
|
background: linear-gradient(
|
|
45deg,
|
|
transparent 45%,
|
|
rgba(108, 92, 231, 0.1) 100%
|
|
);
|
|
transform: rotate(45deg);
|
|
z-index: 0;
|
|
}
|
|
|
|
.column:hover {
|
|
transform: translateY(-10px);
|
|
box-shadow: 0 8px 30px rgba(30,55,153,0.15);
|
|
}
|
|
|
|
.column > * {
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
.column h2 {
|
|
color: var(--primary-color);
|
|
margin-bottom: 1.5rem;
|
|
font-size: 1.5rem;
|
|
position: relative;
|
|
padding-bottom: 1rem;
|
|
}
|
|
|
|
.column h2::after {
|
|
content: '';
|
|
position: absolute;
|
|
bottom: 0;
|
|
left: 0;
|
|
width: 40px;
|
|
height: 3px;
|
|
background: var(--accent-color);
|
|
}
|
|
|
|
/* === Footer === */
|
|
footer {
|
|
background: var(--primary-color);
|
|
color: var(--text-color);
|
|
padding: 4rem 5%;
|
|
margin-top: auto;
|
|
position: relative;
|
|
z-index: 100;
|
|
}
|
|
|
|
.footer-content {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 3rem;
|
|
}
|
|
|
|
.footer-section h3 {
|
|
margin-bottom: 1.5rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.footer-section ul {
|
|
list-style: none;
|
|
}
|
|
|
|
.footer-section a {
|
|
color: rgba(255,255,255,0.8);
|
|
text-decoration: none;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.footer-section a:hover {
|
|
color: var(--text-color);
|
|
padding-left: 0.5rem;
|
|
}
|
|
|
|
.footer-bottom {
|
|
text-align: center;
|
|
margin-top: 3rem;
|
|
padding-top: 2rem;
|
|
border-top: 1px solid rgba(255,255,255,0.15);
|
|
}
|
|
|
|
/* === Responsive Design === */
|
|
@media (max-width: 1200px) {
|
|
.three-columns {
|
|
gap: 2rem;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 992px) {
|
|
.nav-links {
|
|
gap: 1rem;
|
|
}
|
|
|
|
.three-columns {
|
|
grid-template-columns: 1fr;
|
|
max-width: 600px;
|
|
}
|
|
|
|
.column {
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.footer-content {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.logo {
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.nav-links {
|
|
display: none; /* 移动端隐藏菜单,需要添加汉堡菜单 */
|
|
}
|
|
|
|
.slide-up-content {
|
|
padding: 3rem 5%;
|
|
}
|
|
|
|
.footer-content {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
body {
|
|
padding-top: 60px;
|
|
}
|
|
|
|
.slide-up-content {
|
|
margin-top: -100px;
|
|
}
|
|
|
|
.column {
|
|
padding: 2rem;
|
|
}
|
|
}
|
|
/* 让a标签继承column样式 */
|
|
.column {
|
|
display: block; /* 必须设为块级元素 */
|
|
color: inherit; /* 继承字体颜色 */
|
|
text-decoration: none; /* 去除下划线 */
|
|
cursor: pointer;
|
|
}
|
|
/* 解决火浏览器点击闪烁问题 */
|
|
.column {
|
|
backface-visibility: hidden;
|
|
}
|