You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
171 lines
3.1 KiB
171 lines
3.1 KiB
/**
|
|
* 视频Banner样式 - 简化版本
|
|
* 只保留视频背景功能,移除遮罩、文案和模态框
|
|
*/
|
|
|
|
/* 全局样式重置 */
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
html, body {
|
|
overflow-x: hidden;
|
|
max-width: 100%;
|
|
}
|
|
|
|
/* 主容器 */
|
|
.video-banner-block {
|
|
position: relative;
|
|
width: 100%;
|
|
max-width: 100vw;
|
|
box-sizing: border-box;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.video-banner-container {
|
|
position: relative;
|
|
width: 100%;
|
|
max-width: 100%;
|
|
height: 800px; /* 固定高度 */
|
|
overflow: hidden;
|
|
box-sizing: border-box;
|
|
margin-top: 160px;
|
|
}
|
|
|
|
/* 背景图片 */
|
|
.video-banner-bg-image {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background-size: cover;
|
|
background-position: center;
|
|
background-repeat: no-repeat;
|
|
z-index: 1;
|
|
}
|
|
|
|
/* 视频背景容器 */
|
|
.video-background-container {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
overflow: hidden;
|
|
z-index: 2;
|
|
}
|
|
|
|
/* 视频背景 */
|
|
.video-background {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
min-width: 100%;
|
|
min-height: 100%;
|
|
width: auto;
|
|
height: auto;
|
|
transform: translate(-50%, -50%);
|
|
object-fit: cover;
|
|
z-index: 2;
|
|
}
|
|
|
|
/* 响应式设计 */
|
|
@media (max-width: 768px) {
|
|
.video-banner-block,
|
|
.video-banner-container {
|
|
width: 100%;
|
|
max-width: 100vw;
|
|
height: 800px; /* 保持800px高度 */
|
|
overflow-x: hidden;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 576px) {
|
|
.video-banner-block,
|
|
.video-banner-container {
|
|
width: 100%;
|
|
max-width: 100vw;
|
|
height: 800px; /* 保持800px高度 */
|
|
overflow-x: hidden;
|
|
}
|
|
}
|
|
|
|
/* 高对比度支持 */
|
|
@media (prefers-contrast: high) {
|
|
.video-banner-container {
|
|
border: 2px solid #000;
|
|
}
|
|
}
|
|
|
|
/* 减少动画支持 */
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.video-background {
|
|
animation: none;
|
|
}
|
|
}
|
|
|
|
/* 视频内容区域 */
|
|
.video-banner-content {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
text-align: center;
|
|
color: white;
|
|
z-index: 10;
|
|
max-width: 80%;
|
|
}
|
|
|
|
.video-banner-title {
|
|
font-size: 3rem;
|
|
font-weight: bold;
|
|
margin-bottom: 1rem;
|
|
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
|
|
}
|
|
|
|
.video-banner-subtitle {
|
|
font-size: 1.5rem;
|
|
margin-bottom: 1rem;
|
|
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
|
|
}
|
|
|
|
.video-banner-description {
|
|
font-size: 1.1rem;
|
|
margin-bottom: 2rem;
|
|
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
|
|
line-height: 1.6;
|
|
}
|
|
|
|
/* 响应式设计 - 内容区域 */
|
|
@media (max-width: 768px) {
|
|
.video-banner-content {
|
|
max-width: 90%;
|
|
}
|
|
|
|
.video-banner-title {
|
|
font-size: 2rem;
|
|
}
|
|
|
|
.video-banner-subtitle {
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
.video-banner-description {
|
|
font-size: 1rem;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 576px) {
|
|
.video-banner-title {
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.video-banner-subtitle {
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.video-banner-description {
|
|
font-size: 0.9rem;
|
|
}
|
|
} |