HTML代码:
<!DOCTYPE html>
<html>
<head>
<!-- https://www.17sucai.com/preview/330046/2015-08-19/%E5%8D%9A%E6%96%87%E5%B0%9A%E7%BE%8E/index.html
https://www.zcool.com.cn/work/ZNjIzOTEwNA==.html?switchPage=on -->
<meta charset="utf-8">
<title></title>
<!-- 公用部分 -->
<link rel="stylesheet" type="text/css" href="./css/public.css" />
<!-- 头部 -->
<link rel="stylesheet" type="text/css" href="./css/header.css" />
<!-- 轮播 -->
<link rel="stylesheet" type="text/css" href="./css/lunbo.css"/>
<!-- 服务范围 -->
<link rel="stylesheet" type="text/css" href="css/service.css" />
<!-- 客户咨询 -->
<link rel="stylesheet" type="text/css" href="css/service2.css" />
<!-- 最新资讯 -->
<link rel="stylesheet" type="text/css" href="css/service3.css" />
<!-- 底部 -->
<link rel="stylesheet" type="text/css" href="./css/footer.css"/>
<base href="#" target="_blank" />
</head>
<body>
<header>
<div class="headCon banxin clearfloat">
<div class="logo">
<img src="./img/logo.png">
</div>
<div class="menu">
<ul>
<li><a href="">首页</a></li>
<li><a href="#">关于我们</a></li>
<li><a href="#">客户案例</a></li>
<li><a href="#">服务项目</a></li>
<li><a href="#">新闻资讯</a></li>
<li><a href="#">联系我们</a></li>
</ul>
</div>
</div>
</header>
<div class="lunbo">
<div class="image clearfloat ">
<ul>
<li>
<a href=""><img src="./img/lunbo.jpg"></a>
</li>
<li>
<a href=""><img src="./img/lunbo2.jpg"></a>
</li>
<li>
<a href=""><img src="./img/lunbo3.jpg"></a>
</li>
<li>
<a href=""><img src="./img/lunbo4.jpg"></a>
</li>
</ul>
</div>
<div class="disc clearfloat">
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</div>
</div>
<div class="content clearfloat">
<div class="service banxin clearfloat">
<div class="content line_disc">
<div class="line"></div>
<div class="disc"></div>
<div class="title">
<p class="ch">服务范围</p>
<p class="en">OUR SERVICE</p>
</div>
<div class="disc"></div>
<div class="line"></div>
</div>
<div class="list">
<ul>
<li>
<div class="image">
<img src="img/list1_1.png">
</div>
<div class="title">1.WEB DESIGN</div>
<p>企业品牌网站设置/手机网站制作</p>
<p>动画网站创意设计</p>
</li>
<li class="bot">
<div class="image">
<img src="img/list1_1.png">
</div>
<div class="title">1.WEB DESIGN</div>
<p>企业品牌网站设置/手机网站制作</p>
<p>动画网站创意设计</p>
</li>
<li>
<div class="image">
<img src="img/list1_1.png">
</div>
<div class="title">1.WEB DESIGN</div>
<p>企业品牌网站设置/手机网站制作</p>
<p>动画网站创意设计</p>
</li>
<li>
<div class="image">
<img src="img/list1_1.png">
</div>
<div class="title">1.WEB DESIGN</div>
<p>企业品牌网站设置/手机网站制作</p>
<p>动画网站创意设计</p>
</li>
</ul>
</div>
</div>
<div class="service2">
<div class="content banxin">
<div class="title">
<div class="title1">{ 客户咨询 }</div>
<p class="en">With the best professional technology,to design the best innovative web site</p>
</div>
<div class="list clearfloat">
<ul>
<li><img src="./img/li2_1.png"></li>
<li><img src="./img/li2_2.png"></li>
<li><img src="./img/list2_3.png"></li>
</ul>
</div>
<div class="button">
VIEW MORE
</div>
</div>
</div>
<div class="service3 service banxin">
<div class="content line_disc" id="ser3Con">
<div class="line"></div>
<div class="disc"></div>
<div class="title">
<p class="ch">最新资讯</p>
<p class="en">THE LATEST NEWS</p>
</div>
<div class="disc"></div>
<div class="line"></div>
</div>
<div class="detail clearfloat">
<div class="image">
<img src="./img/laat.png">
</div>
<div class="list3 clearfloat">
<ul>
<li>
<div class="data clearfloat">
<div class="day">
28
</div>
<div class="month">
OCT
</div>
</div>
<div class="detail">
<div class="title">选择虚拟机常见的几个注意事项</div>
<p>
无论是企业网站也好,还是个人网站也好。做网站多需要购买虚拟...
</p>
</div>
</li>
<li>
<div class="data clearfloat">
<div class="day">
28
</div>
<div class="month">
OCT
</div>
</div>
<div class="detail">
<div class="title">选择虚拟机常见的几个注意事项</div>
<p>
无论是企业网站也好,还是个人网站也好。做网站多需要购买虚拟...
</p>
</div>
</li>
<li>
<div class="data clearfloat">
<div class="day">
28
</div>
<div class="month">
OCT
</div>
</div>
<div class="detail">
<div class="title">选择虚拟机常见的几个注意事项</div>
<p>
无论是企业网站也好,还是个人网站也好。做网站多需要购买虚拟...
</p>
</div>
</li>
<li>
<div class="data clearfloat">
<div class="day">
28
</div>
<div class="month">
OCT
</div>
</div>
<div class="detail">
<div class="title">选择虚拟机常见的几个注意事项</div>
<p>
无论是企业网站也好,还是个人网站也好。做网站多需要购买虚拟...
</p>
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
<footer>
<div class="footer banxin clearfloat">
<div class="left">Copyright 2006-2014 Bowenshangmei Culture All Rights Reserved</div>
<div class="right clearfloat">
<ul>
<li>
<div class="txt">Home</div>
</li>
<li>
<div class="txt">About</div>
</li>
<li>
<div class="txt">Contact</div>
</li>
<li>
<div class="txt">Profile</div>
</li>
</ul>
</div>
</div>
</footer>
</body>
</html>
CSS代码:
重置样式和公共样式:
* {
margin: 0;
padding: 0;
}
li {
list-style: none;
}
a{
color: #000000;
text-decoration: none;
}
.clearfloat::after {
content: '';
display: block;
clear: both;
}
.banxin {
width: 1080px;
margin: 0 auto;
}
头部:
/* 头部 */
header{
position: sticky;
top: 0;
background-color: rgba(255,255,255,0.5);
}
.headCon{
height: 75px;
top: 0;
z-index: 1;
line-height: 75px;
}
/* 头部标题 */
.headCon .logo{
float: left;
height: 75px;
}
.headCon .logo img{
margin-top: 12px;
}
/* 头部右侧列表 */
.headCon .menu{
/* width: 652px; */
/* height: 75px; */
float: right;
padding: 0px 15px;
}
.headCon .menu ul li{
font-size: 20px;
float: left;
margin-right: 65px;
}
.headCon .menu ul li:first-child a{
color: #66c5b4;
}
.headCon .menu ul li:last-child{
margin-right: 0;
}
轮播图:
/* 中间轮播部分 */
.lunbo {
margin-top: 8px;
/* text-align: center; */
position: relative;
overflow: hidden;
}
.lunbo .image {
margin: auto;
width: 1365px;
height: 500px;
position: relative;
}
.lunbo .image ul li{
position: absolute;
left: 0;
top: 0;
}
.lunbo .disc{
position: absolute;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
}
.lunbo .disc ul li{
float: left;
height: 12px;
width: 12px;
border-radius: 6px;
border: 1px solid white;
background-color:transparent;
margin-right: 10px;
}
.lunbo .disc ul li:hover{
cursor: pointer;
background-color:white;
}
.lunbo .disc ul li:last-child{
margin-right: 0;
}
服务范围:
/* 服务范围 */
.service{
margin-top: 55px;
height: 428px;
}
/* 服务范围-标题部分 */
.service .content{
padding: 0 7px;
width: 326px;
margin: 0 auto;
height: 45px;
}
.service .content div{
float: left;
}
/* 服务范围-标题部分-左右横线 */
.line_disc .line{
margin-top: 12px;
border: 1px solid #e4e4e4;
width: 85px;
}
/* 服务范围-标题部分-左右圆点 */
.line_disc .disc{
margin-top: 8px;
width: 10px;
height: 10px;
border-radius: 10px;
background-color: #e4e4e4;
}
/* 服务范围-标题部分 -题目*/
.line_disc .title{
width: 130px;
height: 45px;
text-align: center;
}
.line_disc .title .ch{
font-size: 20px;
color: #737373;
}
.line_disc .title .en{
margin-top: 5px;
color: #CCCCCC;
font-size: 8px;
}
/* 服务范围-列表部分 */
.service .list{
margin-top: 40px;
height: 240px;
padding: 0 10px;
/* background-color: #00FFFF; */
}
.service .list ul li{
width: 250px;
height: 239px;
float: left;
margin-right: 20px;
text-align: center;
}
.service .list ul li:last-child{
margin-right: 0;
}
.service .list ul li .title{
line-height: 70px;
height: 70px;
color: #717171;
}
.service .list ul li p{
color: #a6a6a6;
}
.service .list ul .bot{
border-bottom: 5px solid #90d7c7;
}
.service .list ul li p:last-child{
margin-top: 8px;
}
客户案例:
/* 客户案例 */
.service2{
height: 465px;
background-color: #f8f8f8;
overflow: hidden;
}
/* 客户案例 版心 */
.service2 .content{
height: 445px;
margin-top: 20px;
overflow: hidden;
}
/* 客户案例 标题 */
.service2 .content .title{
margin: 0 auto;
height: 80px;
margin-top: 40px;
text-align: center;
}
.service2 .content .title .title1{
color: #8dd1c2;
font-size: 20px;
}
.service2 .content .title p{
margin-top: 15px;
color: #9d9d9d;
}
/* 客户案例 图片列表*/
.service2 .content .list{
height: 185px;
}
.service2 .content .list ul li{
float: left;
width: 340px;
height: 185px;
background-color: #717171;
margin-right: 30px;
}
.service2 .content .list ul li:last-child{
margin-right: 0;
}
/* 客户案例 按钮*/
.service2 .content .button{
color: white;
margin: 0 auto;
margin-top: 40px;
width: 170px;
background-color: #63c6b1;
text-align: center;
height: 30px;
line-height: 30px;
border-radius: 15px;
font-size: 10px;
}
最新资讯:
/* 最新资讯 */
.service3{
height: 400px;
}
.service3 #ser3Con{
width: 340px;
height: 148px;
margin: 0 auto;
}
/* 最新资讯 于服务范围区别样式设置*/
.service3 #ser3Con .line{
margin-top: 65px;
}
.service3 #ser3Con .disc{
margin-top: 60px;
}
.service3 #ser3Con .title{
margin-top: 50px;
}
.service3 .detail{
height: 195px;
}
/* 最新资讯 左部图片*/
.service3 .detail .image img{
vertical-align: bottom;
}
.service3 .detail .image{
float: left;
border:3px solid #e5e5e7
}
/* 最新资讯 右侧列表*/
.service3 .detail .list3{
width: 825px;
margin-left: 20px;
float: left;
height: 190px;
}
/* 最新资讯 列表部分*/
.service3 .detail .list3 ul li{
float: left;
height: 75px;
width: 385px;
}
/* 最新资讯 给每行第一个增加右侧距离*/
.service3 .detail .list3 ul li:nth-child(2n+1){
margin-right: 55px;
}
.service3 .detail .list3 ul li:nth-child(3){
margin-top: 40px;
}
.service3 .detail .list3 ul li:nth-child(4){
margin-top: 40px;
}
/* 最新资讯 列表部分 左侧日期部分*/
.service3 .detail .list3 ul li .data{
float: left;
width: 60px;
height: 75px;
border-right: 1px solid #e5e5e7;
overflow: hidden;
}
/* 最新资讯 列表部分 左侧日期部分 天数*/
.service3 .detail .list3 ul li .data .day{
font-size: 25px;
margin-top: 12px;
color: #69c4b5;
font-weight: bold;
}
/* 最新资讯 列表部分 左侧日期部分 月?*/
.service3 .detail .list3 ul li .data .month{
font-size: 12px;
color: #bbbbbb;
}
/* 最新资讯 列表部分 右侧*/
.service3 .detail .list3 ul li .detail{
float: right;
width: 300px;
height: 75px;
}
.service3 .detail .list3 ul li p{
margin-top: 15px;
font-size: 12px;
color:#aeaeae
}
页脚:
/* 底部 */
footer{
background-color: #67c5b5;
height: 55px;
}
.footer{
height: 55px;
}
.footer .left{
float: left;
width: 360px;
height: 55px;
line-height: 55px;
color: white;
font-size: 8px;
}
.footer .right{
float: right;
height: 55px;
}
/* 底部右侧列表 */
.footer .right ul li{
float: left;
font-size: 8px;
margin-top:20px ;
color: white;
}
.footer .right ul li .txt{
height: 12px;
line-height: 12px;
border-right: 1px solid white;
text-align: center;
padding: 0 10px;
}
原图:
仿图:
原首页链接:https://www.17sucai.com/preview/330046/2015-08-19/%E5%8D%9A%E6%96%87%E5%B0%9A%E7%BE%8E/index.html
因为这个页面比较简单,我就没有给太多注释,如果大家又碰到什么问题,可以随时问我。或者是觉得我的代码哪里有什么不足的,还望指正。(等我有空在上传到github哈)