This commit is contained in:
153
css/index.css
153
css/index.css
@@ -1,60 +1,36 @@
|
|||||||
/* banner */
|
/* banner 整体区域:轮播作为背景,文字和下方模块在同一内容宽度内左对齐 */
|
||||||
.banner-cont {
|
.banner {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
background: #f7f9fa;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.banner-cont .swiper-slide {
|
/* 背景轮播图 */
|
||||||
height: 500px;
|
.banner-cont {
|
||||||
width: 100%;
|
|
||||||
background: linear-gradient(0, #f7f9fa, #f9fafb);
|
|
||||||
}
|
|
||||||
|
|
||||||
.banner-cont .swiper-slide .img {
|
|
||||||
/* 保持图片占满宽度,避免拉伸过度 */
|
|
||||||
max-height: 100%;
|
|
||||||
max-width: 100%;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 文案区域:固定在左侧,顶部留出一致间距,避免切换时轻微位移 */
|
|
||||||
.banner-cont .banner-text {
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 420px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.banner-cont .swiper-wrapper,
|
||||||
|
.banner-cont .swiper-slide {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
|
||||||
align-items: flex-start;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.banner-cont .banner-text .section-content {
|
.banner-cont .swiper-slide {
|
||||||
padding-top: 120px;
|
background: transparent;
|
||||||
padding-bottom: 0;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: flex-start;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.banner-cont .banner-text h1 {
|
.banner-cont .swiper-slide .img {
|
||||||
font-size: 40px;
|
width: 100%;
|
||||||
line-height: 1.2;
|
height: 100%;
|
||||||
color: #111827;
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
.banner-cont .banner-desc {
|
.banner-cont .swiper-pagination {
|
||||||
font-size: 16px;
|
bottom: 24px;
|
||||||
margin-top: 16px;
|
|
||||||
margin-bottom: 32px;
|
|
||||||
max-width: 550px;
|
|
||||||
color: rgba(0, 0, 0, 0.65);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 按钮保持可点击 */
|
|
||||||
.banner-cont .banner-text .btn {
|
|
||||||
pointer-events: auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.banner-cont .swiper-pagination-bullet {
|
.banner-cont .swiper-pagination-bullet {
|
||||||
@@ -69,39 +45,70 @@
|
|||||||
background: rgba(255, 103, 57, 1);
|
background: rgba(255, 103, 57, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 文案和下方快捷模块统一放在 section-content 内,保证左对齐 */
|
||||||
|
.banner .banner-layout {
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
padding-top: 120px; /* 覆盖 .section-content 默认的 80px,让文字进入轮播区域 */
|
||||||
|
padding-bottom: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.banner .banner-copy {
|
||||||
|
max-width: 560px;
|
||||||
|
margin-bottom: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.banner .banner-copy #bannerTitle {
|
||||||
|
font-size: 40px;
|
||||||
|
line-height: 1.2;
|
||||||
|
color: #111827;
|
||||||
|
}
|
||||||
|
|
||||||
|
.banner .banner-copy .banner-desc {
|
||||||
|
font-size: 16px;
|
||||||
|
margin-top: 16px;
|
||||||
|
margin-bottom: 32px;
|
||||||
|
max-width: 550px;
|
||||||
|
color: rgba(0, 0, 0, 0.65);
|
||||||
|
}
|
||||||
|
|
||||||
|
.banner .banner-copy #bannerButton {
|
||||||
|
pointer-events: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.banner .banner-s {
|
.banner .banner-s {
|
||||||
box-shadow: 0px 0px 16px rgba(52, 52, 52, 0.16);
|
box-shadow: 0px 0px 16px rgba(52, 52, 52, 0.16);
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.banner .banner-s .banner-list {
|
.banner .banner-s .banner-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.banner-s .banner-list .banner-item {
|
.banner-s .banner-list .banner-item {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
width: 335px;
|
width: 335px;
|
||||||
padding: 30px 60px;
|
padding: 30px 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.banner-s .banner-list .banner-item:hover {
|
.banner-s .banner-list .banner-item:hover {
|
||||||
background: rgba(247, 248, 249, 1);
|
background: rgba(247, 248, 249, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.banner-s .banner-list .banner-item:hover h5 {
|
.banner-s .banner-list .banner-item:hover h5 {
|
||||||
color: #FF6739;
|
color: #FF6739;
|
||||||
}
|
}
|
||||||
|
|
||||||
.banner-list .banner-item .banner-tag {
|
.banner-list .banner-item .banner-tag {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #FF6739;
|
color: #FF6739;
|
||||||
border: 1px solid #FF6739;
|
border: 1px solid #FF6739;
|
||||||
padding: 5px 8px;
|
padding: 5px 8px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 服务内容 */
|
/* 服务内容 */
|
||||||
.service-content {
|
.service-content {
|
||||||
|
|||||||
78
index.html
78
index.html
@@ -13,51 +13,51 @@
|
|||||||
|
|
||||||
<!-- banner -->
|
<!-- banner -->
|
||||||
<section class="section banner">
|
<section class="section banner">
|
||||||
|
<!-- 背景轮播图 -->
|
||||||
<div class="swiper banner-cont">
|
<div class="swiper banner-cont">
|
||||||
<div class="swiper-wrapper" id="bannerWrapper"></div>
|
<div class="swiper-wrapper" id="bannerWrapper"></div>
|
||||||
<!-- 如果需要分页器 -->
|
|
||||||
<div class="swiper-pagination"></div>
|
<div class="swiper-pagination"></div>
|
||||||
<!-- 固定文案区域,使用第一张轮播图的标题/描述/按钮 -->
|
</div>
|
||||||
<div class="banner-text">
|
|
||||||
<div class="section-content">
|
<!-- 文字 + 下方快捷模块,整体左对齐 -->
|
||||||
<h1 id="bannerTitle"></h1>
|
<div class="section-content banner-layout">
|
||||||
<p class="banner-desc" id="bannerDesc"></p>
|
<div class="banner-copy">
|
||||||
<a
|
<h1 id="bannerTitle"></h1>
|
||||||
class="btn btn2 btn-normal"
|
<p class="banner-desc" id="bannerDesc"></p>
|
||||||
href="javascript:;"
|
<a
|
||||||
id="bannerButton"
|
class="btn btn2 btn-normal"
|
||||||
style="display: none;"
|
href="javascript:;"
|
||||||
></a>
|
id="bannerButton"
|
||||||
|
style="display: none;"
|
||||||
|
></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="banner-s">
|
||||||
|
<div class="banner-list">
|
||||||
|
<div class="banner-item" id="cloud-box">
|
||||||
|
<h5>云服务器专场</h5>
|
||||||
|
<p class="title-desc mt-10 mb-10">无数个人用户的共同选择</p>
|
||||||
|
<span class="banner-tag">4核8G仅需228元</span>
|
||||||
|
</div>
|
||||||
|
<div class="banner-item" id="domain-box">
|
||||||
|
<h5>域名注册</h5>
|
||||||
|
<p class="title-desc mt-10 mb-10">优选主流域名注册服务</p>
|
||||||
|
<span class="banner-tag">.top 88元起</span>
|
||||||
|
</div>
|
||||||
|
<div class="banner-item" id="cps-box">
|
||||||
|
<h5>CPS推广</h5>
|
||||||
|
<p class="title-desc mt-10 mb-10">多种产品高达30%高额佣金</p>
|
||||||
|
<span class="banner-tag">最高可返佣金5W</span>
|
||||||
|
</div>
|
||||||
|
<div class="banner-item" id="logon-box">
|
||||||
|
<h5>注册有礼</h5>
|
||||||
|
<p class="title-desc mt-10 mb-10">免费注册领取专属礼包</p>
|
||||||
|
<span class="banner-tag">价值2000元</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
<div class="banner-s">
|
|
||||||
<div class="section-content banner-list">
|
|
||||||
<div class="banner-item" id="cloud-box">
|
|
||||||
<h5>云服务器专场</h5>
|
|
||||||
<p class="title-desc mt-10 mb-10">无数个人用户的共同选择</p>
|
|
||||||
<span class="banner-tag">4核8G仅需228元</span>
|
|
||||||
</div>
|
|
||||||
<div class="banner-item" id="domain-box">
|
|
||||||
<h5>域名注册</h5>
|
|
||||||
<p class="title-desc mt-10 mb-10">优选主流域名注册服务</p>
|
|
||||||
<span class="banner-tag">.top 88元起</span>
|
|
||||||
</div>
|
|
||||||
<div class="banner-item" id="cps-box">
|
|
||||||
<h5>CPS推广</h5>
|
|
||||||
<p class="title-desc mt-10 mb-10">多种产品高达30%高额佣金</p>
|
|
||||||
<span class="banner-tag">最高可返佣金5W</span>
|
|
||||||
</div>
|
|
||||||
<div class="banner-item" id="logon-box">
|
|
||||||
<h5>注册有礼</h5>
|
|
||||||
<p class="title-desc mt-10 mb-10">免费注册领取专属礼包</p>
|
|
||||||
<span class="banner-tag">价值2000元</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<!-- 服务内容 -->
|
<!-- 服务内容 -->
|
||||||
<section class="section service">
|
<section class="section service">
|
||||||
|
|||||||
Reference in New Issue
Block a user