小小美化

This commit is contained in:
ChoChoX
2026-06-15 23:20:21 +08:00
parent b067ea3723
commit e5a0753e58
11 changed files with 567 additions and 186 deletions

View File

@@ -1,29 +1,39 @@
<template>
<div class="home-container">
<div class="banner">
<video src="../../public/蜜雪冰城-雪王百科.mp4" autoplay muted loop></video>
</div>
</div>
<div class="home-body">
<div class="first-head">雪王简介</div>
<div class="intro-content">
<div class="pic">
<img src="../../public/mixue.png" alt="雪王">
<!-- 顶部视频横幅 -->
<div class="video-banner">
<video src="../../public/蜜雪冰城-雪王百科.mp4" autoplay muted loop class="bg-video"></video>
<div class="video-overlay">
<h2 class="banner-title">欢迎使用蜜雪冰城管理系统</h2>
</div>
<div class="txt">
<div class="second-head">
"我是手拿冰淇凌权杖的雪王"
<br>
"一生只爱冰淇凌与茶"
</div>
<!-- 雪王简介 -->
<div class="intro-section">
<div class="section-header">
<div class="header-line"></div>
<h2 class="section-title">雪王简介</h2>
<div class="header-line"></div>
</div>
<div class="intro-content">
<div class="pic-wrapper">
<img src="../../public/mixue.png" alt="雪王" class="xuewang-img">
</div>
<div class="txt-wrapper">
<div class="quote">
"我是手拿冰淇凌权杖的雪王"
<br>
"一生只爱冰淇凌与茶"
</div>
<ul class="info-list">
<li v-for="(item, index) in snowKingInfo" :key="index">
<span class="info-label">{{ item.label }}</span>
<span class="info-divider"></span>
<span class="info-value">{{ item.value }}</span>
</li>
</ul>
</div>
<ul class="xuewang-list">
<li v-for="(item, index) in snowKingInfo" :key="index">
<span class="label">{{ item.label }}</span>
<span class="divider"></span>
<span class="value">{{ item.value }}</span>
</li>
</ul>
</div>
</div>
</div>
@@ -43,152 +53,182 @@ const snowKingInfo = ref([
<style scoped>
.home-container {
padding: 0;
text-align: center;
min-height: 100%;
}
.banner {
width: 100%;
height: 90vh;
min-height: 500px;
/* ========== 视频横幅 ========== */
.video-banner {
position: relative;
width: calc(100% + 40px);
margin: -20px -20px 0 -20px;
height: 300px;
overflow: hidden;
}
.banner video {
.bg-video {
width: 100%;
height: 100%;
object-fit: cover;
}
.home-body {
padding: 100px 80px;
background: linear-gradient(180deg, #FEF7F7 0%, rgba(254, 247, 247, 0.00) 64.96%);
.video-overlay {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(
to bottom,
rgba(230, 0, 18, 0.3) 0%,
rgba(0, 0, 0, 0.4) 100%
);
display: flex;
align-items: center;
justify-content: center;
}
.first-head {
text-align: center;
font-size: 58px;
.banner-title {
color: #fff;
font-size: 32px;
font-weight: 600;
text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
margin: 0;
}
/* ========== 简介区域 ========== */
.intro-section {
padding: 40px 20px;
}
.section-header {
display: flex;
align-items: center;
justify-content: center;
gap: 20px;
margin-bottom: 40px;
}
.header-line {
flex: 1;
max-width: 200px;
height: 2px;
background: linear-gradient(90deg, transparent, #E60012, transparent);
}
.section-title {
font-size: 32px;
font-weight: 700;
color: #2E2F30;
margin-bottom: 68px;
line-height: 1.17;
color: #E60012;
margin: 0;
white-space: nowrap;
}
.intro-content {
display: flex;
justify-content: space-between;
justify-content: center;
align-items: center;
max-width: 1400px;
gap: 60px;
max-width: 1200px;
margin: 0 auto;
}
.pic {
width: 750px;
height: 660px;
border-radius: 30px;
/* 雪王图片 */
.pic-wrapper {
flex-shrink: 0;
width: 400px;
height: 400px;
border-radius: 20px;
overflow: hidden;
box-shadow: 0 8px 30px rgba(230, 0, 18, 0.15);
transition: transform 0.3s;
}
.pic img {
.pic-wrapper:hover {
transform: translateY(-5px);
}
.xuewang-img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.5s;
}
.pic:hover img {
transform: scale(1.05);
/* 文字内容 */
.txt-wrapper {
flex: 1;
max-width: 500px;
}
.txt {
width: 676px;
}
.second-head {
font-size: 46px;
.quote {
font-size: 28px;
font-weight: 700;
color: #E60012;
line-height: 1.33;
margin-bottom: 67px;
line-height: 1.5;
margin-bottom: 40px;
padding-left: 20px;
border-left: 4px solid #E60012;
}
.xuewang-list {
.info-list {
list-style: none;
padding: 0;
margin: 0;
}
.xuewang-list li {
.info-list li {
display: flex;
align-items: center;
margin-bottom: 18px;
color: #666;
font-size: 24px;
font-weight: 400;
line-height: 1.5;
padding: 14px 0;
border-bottom: 1px dashed #eee;
font-size: 16px;
}
.xuewang-list li:last-child {
margin-bottom: 0;
.info-list li:last-child {
border-bottom: none;
}
.xuewang-list .label {
color: #2E2F30;
font-weight: 700;
min-width: 80px;
.info-label {
font-weight: 600;
color: #303133;
min-width: 70px;
}
.xuewang-list .divider {
.info-divider {
width: 1px;
height: 18px;
background-color: #999;
margin: 0 15px;
height: 16px;
background: #E60012;
margin: 0 16px;
}
.xuewang-list .value {
display: flex;
align-items: center;
.info-value {
color: #606266;
flex: 1;
}
/* 响应式适配 */
@media (max-width: 1200px) {
/* ========== 响应式适配 ========== */
@media (max-width: 900px) {
.intro-content {
flex-direction: column;
gap: 30px;
}
.pic {
.pic-wrapper {
width: 100%;
max-width: 400px;
height: auto;
aspect-ratio: 750/660;
aspect-ratio: 1;
}
.txt {
.txt-wrapper {
width: 100%;
margin-top: 48px;
}
}
@media (max-width: 768px) {
.home-body {
padding: 50px 20px;
}
.first-head {
font-size: 36px;
margin-bottom: 40px;
.banner-title {
font-size: 24px;
}
.second-head {
font-size: 28px;
margin-bottom: 40px;
}
.xuewang-list li {
font-size: 18px;
flex-direction: column;
align-items: flex-start;
}
.xuewang-list .divider {
display: none;
.video-banner {
height: 200px;
}
}
</style>