HTML和CSS实现京东首页(html和css详解)_京东主页实现-程序员宅基地

技术标签: css  chrome  html5  html  css3  【Web】  

HTML和CSS实现京东首页,效果图如下:
在这里插入图片描述
基本代码如下:需要源代码和素材的评论区留言
(1)页面部分设计如下:

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>京东(JD.COM)-综合网购首选-正品低价、品质保障、配送及时、轻松购物!</title>
        <meta name="description" content="京东JD.COM-专业的综合网上购物商城,销售家电、数码通讯、电脑、家居百货、服装服饰、母婴、图书、食品等数万个品牌优质商品.便捷、诚信的服务,为您提供愉悦的网上购物体验!" />
        <meta name="Keywords" content="网上购物,网上商城,手机,笔记本,电脑,MP3,CD,VCD,DV,相机,数码,配件,手表,存储卡,京东" />
        <link rel="shortcut icon" href="favicon.ico"  type="image/x-icon"/> 
        <!-- 引入css初始化文件 -->
        <link rel="stylesheet" href="css/normalize.css" />
        <!-- 头部和底部 结构基本相同  我们做基本的公共样式 -->
        <link rel="stylesheet" href="css/base.css" />
        <!--   我们做专属的首页样式 -->
        <link rel="stylesheet" href="css/index.css" />

    </head>
    <body>
    <!-- header 部分 start -->
	<header>
		<div class="w">
			<a href="#">
				<img src="images/header.jpg" height="80" width="1190" alt="">
			</a>
		</div>
	</header>
    <!-- header 部分 end -->
	<!-- 快速导航栏部分 start-->
	<div class="shortcut">
		<div class="w">
			<ul class="fl city">
				<li> <i class="f10"></i><a href="#">北京</a></li>
			</ul>
			<ul class="fr">
				<li>
					<a href="#">你好,请登录</a>
					<a href="#" class="f10">免费注册</a>
				</li>
				<li class="space"></li>
				<li>
					<a href="#">我的订单</a>
				</li>
				<li class="space"></li>
				<li>
					<a href="#">我的京东</a>
					<i></i>
				</li>
				<li class="space"></li>
				<li>
					<a href="#">京东会员</a>
				</li>

				<li class="space"></li>
				<li>
					<a href="#">企业采购</a>
				</li>
				<li class="space"></li>
				<li>
					<a href="#">客户服务</a>
					<i></i>
				</li>
				<li class="space"></li>
				<li>
					<a href="#">网站导航</a>
					<i></i>
				</li>
				<li class="space"></li>
				<li>
					<a href="#" class="mobile">手机京东
					 <img src="images/mobile.png" height="60" width="60" alt="">
					</a>
				</li>
			</ul>
		</div>
	</div>
	<!-- 快速导航栏部分 end-->
	<!-- 中间头部分 start -->
	<div class="w middle">
		<div class="logo">
			<h1>  <!-- 提高权重  便利于搜索引擎优化 -->
				<a href="#"></a>  
			</h1>
		</div>
		<!-- 搜索 -->
		<div class="form">
			<input type="text" placeholder="扫描仪">
			<!-- 按钮的意思 双标签 等价于 <input type="button" value=""> -->
			<button> <i></i> </button>  
		</div>
		<!-- 购物车 -->
		<div class="shopCar">
			<i></i><a href="#" class="f10">我的购物车</a> <span>0</span>
		</div>
		<!-- 关键词 -->
		<div class="hotwords">
			<a href="#" class="f10">199减100</a>
			<a href="#">鼠标试用</a>
			<a href="#">农资7折</a>
			<a href="#">低至29元</a>
			<a href="#">抽奖赢空调</a>
			<a href="#">记忆棉</a>
			<a href="#">坐垫</a>
			<a href="#">1分钱买油</a>
			<a href="#">智能手表</a>
		</div>
		<!-- 小导航部分 -->
		<div class="navitems">
			<ul>
				<li><a href="#">秒杀</a></li>
				<li><a href="#">优惠券</a></li>
				<li><a href="#">闪购</a></li>
				<li><a href="#">拍卖</a></li>
				<li class="space"></li>
				<li><a href="#">服装城</a></li>
				<li><a href="#">京东超市</a></li>
				<li><a href="#">生鲜</a></li>
				<li><a href="#">全球购</a></li>	
				<li class="space"></li>
				<li><a href="#">京东金融</a></li>
			</ul>
			
		</div>
		<!-- 超级日部分 -->
		<div class="super">
			<a href="#"><img src="images/super.png" height="40" width="190" alt=""></a>
		</div>
	</div>
	<!-- 中间头部分 end -->

	<!-- 中间分类区域 start -->
	<div class="w grid">
		<div class="grid-col1 fl">
			<div class="ad">
				<img src="images/ad-l.png" height="480" width="250" alt="">
				<div class="ad-r"></div>
			</div>
			<ul>
				<li><a href="#">家用电器</a></li>
				<li><a href="#">手机</a>/<a href="#">运用商</a>/<a href="#">数码</a></li>
				<li><a href="#">手机</a>/<a href="#">运用商</a>/<a href="#">数码</a></li>
				<li><a href="#">手机</a>/<a href="#">运用商</a>/<a href="#">数码</a></li>
				<li><a href="#">手机</a>/<a href="#">运用商</a>/<a href="#">数码</a></li>
				<li><a href="#">手机</a>/<a href="#">运用商</a>/<a href="#">数码</a></li>
				<li><a href="#">手机</a>/<a href="#">运用商</a>/<a href="#">数码</a></li>
				<li><a href="#">手机</a>/<a href="#">运用商</a>/<a href="#">数码</a></li>
				<li><a href="#">手机</a>/<a href="#">运用商</a>/<a href="#">数码</a></li>
				<li><a href="#">手机</a>/<a href="#">运用商</a>/<a href="#">数码</a></li>
				<li><a href="#">手机</a>/<a href="#">运用商</a>/<a href="#">数码</a></li>
				<li><a href="#">手机</a>/<a href="#">运用商</a>/<a href="#">数码</a></li>
				<li><a href="#">手机</a>/<a href="#">运用商</a>/<a href="#">数码</a></li>
				<li><a href="#">图像</a>/<a href="#">音响</a>/<a href="#">电子书</a></li>
				<li><a href="#">手机</a>/<a href="#">运用商</a>/<a href="#">数码</a></li>
				<li><a href="#">理财</a>/<a href="#">众筹</a>/<a href="#">白条</a>/<a href="#">保险</a></li>
			</ul>
		</div>
		<div class="grid-col2 fl">
			<div class="grid-col2-t">
				<a href="#"><img src="images/banner.jpg" height="340" width="790" alt=""></a>
				<a href="#" class="arrow-l"><</a>
				<a href="#" class="arrow-r">></a>
				<ul class="circle">
					<li></li>
					<li></li>
					<li class="current"></li>
					<li></li>
					<li></li>
					<li></li>
					<li></li>
					<li></li>
				</ul>
			</div>
			<div class="grid-col2-b">
				<div><img src="images/l.jpg" height="130" width="390" alt=""></div>
				<div><img src="images/r.jpg" height="130" width="390" alt=""></div>
			</div>
		</div>
		<div class="grid-col3 fr">
			<!-- 登录模块 -->
			<div class="login">
				<div class="login-t">
					Hi,欢迎来到京东!<br />
					<a href="#">登录</a>
					<a href="#">注册</a>
					<a href="#" class="user-info">
						<img src="images/no_login.jpg" alt="">
					</a>
				</div>
				<div class="login-b">
					<a href="#">新人福利</a>
					<a href="#">PLUS会员</a>
				</div>
			</div>
			<!-- 新闻模块 -->
			<div class="news">
				<div class="news-t">
					<a href="#" class="cuxiao">促销</a>
					<a href="#" class="gg">公告</a>
					<a href="#" class="more">更多</a>
					<div></div>
				</div>
				<div class="news-b">
					<ul>
						<li><a href="#">挑战3天不洗头</a></li>
						<li><a href="#">挑战3天不洗头</a></li>
						<li><a href="#">益生菌领券满399减100</a></li>
						<li><a href="#">益生菌领券满399减100</a></li>
					</ul>
				</div>
			</div>
			<!-- 服务扩展模块 -->
			<div class="expand">
				<ul>
					<li>
						<a href="#">
							<i></i>
							<span>话费</span>
						</a>
					</li>
					<li>
						<a href="#">
							<i></i>
							<span>话费</span>
						</a>
					</li>
					<li>
						<a href="#">
							<i></i>
							<span>话费</span>
						</a>
					</li>
					<li>
						<a href="#">
							<i></i>
							<span>话费</span>
						</a>
					</li>
					<li>
						<a href="#">
							<i></i>
							<span>话费</span>
						</a>
					</li>
					<li>
						<a href="#">
							<i></i>
							<span>话费</span>
						</a>
					</li>
					<li>
						<a href="#">
							<i></i>
							<span>话费</span>
						</a>
					</li>
					<li>
						<a href="#">
							<i></i>
							<span>话费</span>
						</a>
					</li>
					<li>
						<a href="#">
							<i></i>
							<span>话费</span>
						</a>
					</li>
					<li>
						<a href="#">
							<i></i>
							<span>话费</span>
						</a>
					</li>
					<li>
						<a href="#">
							<i></i>
							<span>话费</span>
						</a>
					</li>
					<li>
						<a href="#">
							<i></i>
							<span>话费</span>
						</a>
					</li>
				</ul>
			</div>
		</div>
	</div>

	<!-- 中间分类区域 end -->


	<!-- 页面底部分 start  -->
	<footer>
		<!-- 服务模块 -->
		<div class="service">
			<div class="w">
				<ul>
					<li>
						<h5></h5>
						<p>品类齐全,轻松购物</p>
					</li>
					<li>
						<h5></h5>
						<p>品类齐全,轻松购物</p>
					</li>
					<li>
						<h5></h5>
						<p>品类齐全,轻松购物</p>
					</li>
					<li>
						<h5></h5>
						<p>品类齐全,轻松购物</p>
					</li>
				</ul>
			</div>
		</div>
		<!-- 帮助模块 -->
		<div class="w help">
			<div class="fl">
				<dl>
					<dt>购物指南</dt>
					<dd><a href="#">购物流程</a></dd>
					<dd><a href="#">购物流程</a></dd>
					<dd><a href="#">购物流程</a></dd>
					<dd><a href="#">购物流程</a></dd>
					<dd><a href="#">购物流程</a></dd>
					<dd><a href="#">购物流程</a></dd>
				</dl>
				<dl>
					<dt>购物指南</dt>
					<dd><a href="#">购物流程</a></dd>
					<dd><a href="#">购物流程</a></dd>
					<dd><a href="#">购物流程</a></dd>
					<dd><a href="#">购物流程</a></dd>
					<dd><a href="#">购物流程</a></dd>
					<dd><a href="#">购物流程</a></dd>
				</dl>
				<dl>
					<dt>购物指南</dt>
					<dd><a href="#">购物流程</a></dd>
					<dd><a href="#">购物流程</a></dd>
					<dd><a href="#">购物流程</a></dd>
					<dd><a href="#">购物流程</a></dd>
					<dd><a href="#">购物流程</a></dd>
					<dd><a href="#">购物流程</a></dd>
				</dl>
				<dl>
					<dt>购物指南</dt>
					<dd><a href="#">购物流程</a></dd>
					<dd><a href="#">购物流程</a></dd>
					<dd><a href="#">购物流程</a></dd>
					<dd><a href="#">购物流程</a></dd>
					<dd><a href="#">购物流程</a></dd>
					<dd><a href="#">购物流程</a></dd>
				</dl>
				<dl>
					<dt>购物指南</dt>
					<dd><a href="#">购物流程</a></dd>
					<dd><a href="#">购物流程</a></dd>
					<dd><a href="#">购物流程</a></dd>
					<dd><a href="#">购物流程</a></dd>
					<dd><a href="#">购物流程</a></dd>
					<dd><a href="#">购物流程</a></dd>
				</dl>
			</div>
			<div class="fr coverage">
				<h5>京东自营覆盖区县</h5>
				<p>京东已向全国2661个区县提供自营配送服务,支持货到付款、POS机刷卡和售后上门服务。</p>
				<a href="#">查看详情 > </a>
			</div>
		</div>

		<div class="w copyright">
			<p> 
				<a href="#">关于我们</a>
				<span>|</span> 
				<a href="#">联系我们</a>
				<span>|</span> 
				<a href="#">关于我们</a>
				<span>|</span> 
				<a href="#">关于我们</a>
				<span>|</span> 
				<a href="#">关于我们</a>
				<span>|</span> 
				<a href="#">关于我们</a>
				<span>|</span> 
				<a href="#">关于我们</a>
				<span>|</span> 
				<a href="#">关于我们</a>
				<span>|</span> 
				<a href="#">关于我们</a>
				<span>|</span> 
				<a href="#">关于我们</a>
				<span>|</span> 
				<a href="#">关于我们</a>
				<span>|</span> 
				<a href="#">京东公益</a>
				<span>|</span> 
				<a href="#">English Site</a>
				<span>|</span> 
				<a href="#">Media & IR</a>
				<span>|</span> 

			</p>
			<div>
				<p>京公网安备 11000002000088号<span>|</span>京ICP证070359号<span>|</span>互联网药品信息服务资格证编号(京)-经营性-2014-0008<span>|</span>新出发京零 字第大120007号</p>
<p>互联网出版许可证编号新出网证(京)字150号<span>|</span>出版物经营许可证<span>|</span>网络文化经营许可证京网文[2014]2148-348号<span>|</span>违法和不良信息举报电话:4006561155</p>
<p>Copyright  2004 - 2017  京东JD.com 版权所有|消费者维权热线:4006067733经营证照
京东旗下网站:京东支付|京东云</p>
			</div>
			<p class="foot-icon">
				<a href="#"></a>
				<a href="#"></a>
				<a href="#"></a>
				<a href="#"></a>
				<a href="#"></a>
				<a href="#"></a>
			</p>

		</div>
	</footer>
	<!-- 页面底部分 end  -->
    </body>
</html>

(2)背景渐变设计:
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <style>
        div {
     
        	width: 300px;
        	height: 50px;
        	/* background: linear-gradient(渐变的起始位置, 起始颜色, 结束颜色); */
        	background: linear-gradient(top, red, green);
        	background: -webkit-linear-gradient(top, red, green);
        	background: -moz-linear-gradient(top, red, green);
        	/* 因为背景渐变 兼容性问题很严重, 必须在前面添加浏览器的私有前缀 */
        	margin: 200px auto;
		
        }
       
        section {
     
        	width: 400px;
        	height: 100px;
        	margin: 0 auto;
        	 /* background:-webkit-linear-gradient(渐变的起始位置, 颜色 位置, 颜色位置....); */
        	background: -webkit-linear-gradient(top, red 0%, green 20%, blue 80%);
        	background: -moz-linear-gradient(left, red 0%, green 50%, skyblue 80%,  hotpink 100%)
        }
        </style>
    </head>
    <body>
    <div></div>
    <section></section>
    </body>
</html>

CSS代码如下:
(1)base部分代码如下:

/*
* @Author: apple
* @Date:   2017-07-25 11:10:42
* @Last Modified by:   apple
* @Last Modified time: 2017-07-27 00:20:43
*/
img {
    
	/* display: block; */
	vertical-align: top; /* 解决图片底测有空白缝隙的问题 */
}
.w {
      /* 版心的公共类 */
	width: 1190px;  /* 京东的版心是 1190 */  
	margin: 0 auto;  
}
.fl {
     /*  浮动的公共类 */
	float: left;
}
.fr {
    
	float: right;
}
 a {
    
	text-decoration: none;  /* 取消下划线 */
	font-size: 12px;
	color: #999;
}
a:hover {
    
	color: #c81623;
}
blockquote,body,button,dd,dl,dt,fieldset,form,h1,h2,h3,h4,h5,h6,hr,input,legend,li,ol,p,pre,td,textarea,th,ul{
    
	margin: 0;
	padding: 0;
}
input,button {
    
	border: 0;
	outline: none;  /* 取消轮廓边框 */
}
ul {
    
	list-style: none;
	
}

body {
    
	background-color: #f6f6f6;
}

.f10{
    
	color: #f10215!important;
}

@font-face {
      /* 声明字体 */
  font-family: 'icomoon';
  src:  url('../fonts/icomoon.eot?8qhwk5');
  src:  url('../fonts/icomoon.eot?8qhwk5#iefix') format('embedded-opentype'),
    url('../fonts/icomoon.ttf?8qhwk5') format('truetype'),
    url('../fonts/icomoon.woff?8qhwk5') format('woff'),
    url('../fonts/icomoon.svg?8qhwk5#icomoon') format('svg');
  font-weight: normal;
  font-style: normal;
}
/* header部分 */
header {
    
	height: 80px;
	background-color: #020000;
}
/* 快速导航栏begin */
.shortcut {
    
	height: 30px;
	line-height: 30px;
	background-color: #e3e4e5;
	border-bottom: 1px solid #ddd;
	
}
.city {
    
	margin-left: 200px;
}
.shortcut li {
    
	float: left;
}
.shortcut i {
    
	font-family: "icomoon";
	font-style: normal;  /* 让倾斜的不倾斜 */
	color: #ccc;
}
.space {
      /* 小竖线 */
	width: 1px;
	height: 10px;
	background-color: #ccc;
	margin: 10px  12px 0;  /* 上 10  左右是 12  下是 0 */
}
.mobile {
    
	position: relative;
}
.mobile img {
    
	position: absolute;
	left: -3px;
	top: 24px;
	border: 1px solid #ccc;
	padding: 3px;
}
/* 快速导航栏over */
/* 中间大部分 */
.middle {
    
	height: 140px;
	position: relative;
}
.logo {
    
	position: absolute;
	top: -30px;
	left: 0;
	box-shadow: 0px -10px 10px rgba(0,0,0,.3);
}
.logo a {
    
	display: block;
	width: 190px;
	height: 170px;
	background: #fff url(../images/logo.png) no-repeat;
}
/* 搜索框 */
.form {
    
	width: 550px;
	height: 35px;
	position: absolute;
	top: 25px;
	left: 320px;
}
.form input {
    
	width: 495px;
	height: 33px;
	border: 1px solid #f10215;
	float: left;
	font-size: 14px;
	padding-left:3px;
}
.form button {
    
	width: 50px;
	height: 35px;
	background-color: #f10215;
	float: left;
}
.form button i {
    
	font-family: 'icomoon';
	font-style: normal;
	color: #fff;
}
/* 购物车 */
.shopCar {
    
	width: 188px;
	height: 33px;
	line-height: 33px;
	border: 1px solid #ccc;
	position: absolute;
	top: 25px;
	right: 95px;
	background-color: #fff;
	text-align: center;
	color: #f10215;

}
.shopCar i {
    
	font-family: 'icomoon';
	margin-right: 5px;
	font-style: normal;
}
.shopCar span {
    
	width: 15px;
	height: 15px;
	background-color: #f10215;
	border-radius: 50%;
	position: absolute;  /* 加了绝对定位 固定定位 浮动的行内元素, 可以不用转换,直接给宽度和高度 */
	top: 5px;
	right: 30px;
	font-size: 12px;
	color: #fff;
	line-height: 15px;
}
/* 关键词模块 */
.hotwords {
    
	position: absolute;
	top: 68px;
	left: 320px;
}
/* 小导航模块 */
.navitems {
    
	width: 770px;
	height: 40px;
	position: absolute;
	bottom: 0;
	left: 200px;
	line-height: 40px;
}
.navitems li {
    
	float: left;
	margin-left: 30px;
}
.navitems li a {
    
	font-size: 16px;
	font-weight: 700; 
	color: #555;
}
.navitems li a:hover {
    
	color: #f10215;
	}
.navitems .space {
    
	/* margin-top: 15px;
	margin-left:15px;
	margin-right: -15px; */
	margin:15px -15px 0 15px;
}
/* 超级日 */
.super {
    
	position: absolute;
	bottom: 10px;
	right: 0;
}
/* 页面底部 */
footer {
    
	margin-top: 35px;
	height: 500px;
	background-color: #EAEAEA;
}
footer a {
    
	color: #666;
}
.service {
    
	padding: 30px 0; 
	border-bottom: 1px solid #DEDEDE;
	overflow: hidden;
}
.service ul li {
    
	width: 297px;
	height: 43px;
	position: relative;
	line-height: 43px;
	float: left;
}
.service  li h5 {
    
	position: absolute;
	top: 0;
	left: 38px;
	width: 36px;
	height: 43px;
	background: url(../images/ico.png) no-repeat;
	text-indent: -999em;
}
.service  li:nth-child(2) h5 {
    
	background-position: 0 -43px;
}
.service  li:nth-child(3) h5 {
    
	background-position: 0 -86px;
}
.service  li:nth-child(4) h5 {
    
	background-position: bottom;
}
.service  li p {
    
	font-weight: 700;
	margin-left: 82px;

}

/* 帮助模块 */
.help {
    
	height: 200px;
	border-bottom: 1px solid #DEDEDE;
	padding-top: 25px;
	box-sizing: border-box;
}
.help dl {
    
	width: 192px;
	float: left;
}
.help dt,
.coverage h5 {
    
	height: 30px;
	font-size: 14px;
	color: #666;
}
.help dd {
    
	height: 22px;
}

/* 范围 */
.coverage {
    
	width: 200px;
	height: 150px;
	background: url(../images/ico_footer.png) no-repeat;
}
.coverage h5 {
    
	padding-left: 35px;
}
.coverage p {
    
	font-size: 12px;
	color: #666;
	line-height: 18px;
	width: 180px;
}
.coverage a {
    
	display: block;
	margin-top: 5px;
	width: 180px;
	text-align: right;
}
/* 底部版权 */
.copyright {
    
	padding-top: 20px;
	text-align: center;
	color: #666;
	font-size: 12px;
}
.copyright span {
    
	margin: 0 10px;
}

.copyright div {
    
	margin-top:20px;
}
.copyright div p {
    
	line-height: 22px;
}
.foot-icon a {
    
	display: inline-block;
	width: 103px;
	height: 33px;
	background: url(../images/ico_footer.png) no-repeat 0 -150px;
	margin: 20px 4px 0;
	/* 行内块可以用 text-align: center 来实现居中 */
}
.foot-icon a:nth-child(2) {
    
	background-position: -103px  -150px;
}
.foot-icon a:nth-child(3) {
    
	background-position: 0  -183px;
}.foot-icon a:nth-child(4) {
    
	background-position: -103px  -183px;
}.foot-icon a:nth-child(5) {
    
	background-position: 0  -216px;
}.foot-icon a:nth-child(6) {
    
	background-position: -103px  -216px;
}

(2)index部分

/*
* @Author: apple
* @Date:   2017-07-26 23:27:21
* @Last Modified by:   apple
* @Last Modified time: 2017-07-27 14:30:23
*/
/* 中间分类模块开始 */
.grid {
    
	height: 480px;
}
.grid-col1 {
    
	width: 190px;
	height: 100%;
	background-color: #6e6568;
	color: #fff;
	font-size: 14px;  /* 不是给字的,给 /  */
	position: relative;
}
.ad {
    
	width: 250px;
	height: 480px;
/* 	background-color: pink;
 */	position: absolute;
	top: 0;
	left: -250px;
}
.ad-r {
    
	position: absolute;
	top: 0;
	left: 250px;
	z-index: 999;
	width: 0;
	height: 480px;
	background: url(../images/ad-r.jpg);
	/* z这个盒子做动画,所以给它添加过渡 */
	transition: all 0.8s;
}
.ad:hover .ad-r {
      
	/* 鼠标经过 ad 这个广告大盒子的时候, 里面的这个叫 ad-r的盒子的宽度由0变为 990 */
	width: 990px;
}
.grid-col1 a {
    
	color: #fff;
	font-size: 14px;  /* 是给链接文字  */
	margin: 0 3px;
}
.grid-col1 a:hover {
    
	color: #f10215;
}
.grid-col1 ul {
    
	padding: 10px 0;
}
.grid-col1 ul li {
    
	padding-left: 12px;
	height: 29px;
	line-height: 26px;
	/* margin-left: 12px; 同学们体会下 这里为什么不用 margin  就是因为下面有鼠标经过的效果*/
}
.grid-col1 ul li:hover {
    
	background-color: #9c9698;
}

.grid-col2 {
    
	width: 790px;
	height: 100%;
	margin-left: 10px;
}
/* banner部分 */
.grid-col2-b div {
    
	float: left;
	margin-top: 10px;
}
.grid-col2-b div:last-child {
    
	float: right;
	margin-top: 10px;
}
/* 箭头部分 */
.grid-col2-t {
    
	position: relative;
}
.arrow-l,
.arrow-r {
    
	position: absolute;
	top: 50%;
	width: 30px;
	height: 60px;
	background: rgba(0, 0, 0, 0.3);
	transform: translateY(-50%);
	text-align: center;
	line-height: 60px;
	font-size: 20px;
	color: rgba(255, 255, 255, .6);
	font-family: arial;
	font-weight: normal;
}
.arrow-r {
    
	right: 0;
}
.circle {
    
	width: 167px;
	height: 20px;
	background: rgba(255, 255, 255, .3);
	position: absolute;
	left: 50%;
	bottom: 20px;
	transform: translateX(-50%);
		border-radius: 10px;
		padding-left: 8px;
}
.circle li {
    
	width: 12px;
	height: 12px;
	background-color: #fff;
	border-radius: 50%;
	float: left;
	margin: 4px;
	cursor: pointer;  /* 鼠标经过li 的时候变成小手 */
}
.circle .current {
    
	background-color: #f10215;
}

.grid-col3 {
    
	width: 190px;
	height: 100%;
}
/* 右边模块 */
.login {
    
	height: 85px;
	border-bottom: 1px solid #ccc;
	background-color: #fff;
	padding: 15px;
}
.login-t {
    
	width: 95px;
	height: 60px;
	line-height: 20px;
	font-size: 12px;
	white-space: nowrap;  /* 强制一行内显示 */
	overflow: hidden;  /* 溢出隐藏 */
	text-overflow: ellipsis; /* 超出的部分显示 省略号 */
	color: #666;
	padding-left: 60px;  /* 这里给padding 把文字挤过来 */
	position: relative;
}
.login-t a {
    
	color: #666;
}
.login-t a:hover {
    
	color: #f10512;
}
.user-info {
    
	width: 50px;
	height: 50px;
	position: absolute;
	left: 0;
	top: 0;
	background: url(../images/sprite_userinfo@1x.png) no-repeat -70px 0;
	
}
.login-b a {
    
	display: inline-block;
	width: 70px;
	height: 20px;
	line-height: 20px;
	border: 2px solid #f10215;
	margin-right: 3px;
	text-align: center;
	color: #f10215;
}
.login-b a:hover {
    
	background-color:  #f10215;
	color: #fff;
}
.user-info img {
    
	width: 40px;
	border-radius: 50%;
	margin: 5px;
}
.news {
    
	height: 154px;
	border-bottom: 1px solid #ccc;
	background-color: #fff;
	padding: 7px 13px 0;
	box-sizing: border-box;
}
.news-t {
    
	height: 19px;
	border-bottom: 1px solid #ccc;
	position: relative;
}
.news-t a {
    
	float: left;
	height: 17px;
	line-height: 17px;
}
.cuxiao {
    
	width: 38px;

	border-right: 1px solid #ccc;
}
.gg {
    
	margin-left: 15px;
}
.news-t .more {
    
	float: right;
}
.news-t div {
    
	height: 2px;
	width: 28px;
	background-color: #f10215;
	position: absolute;
	bottom: -1px;
	left: 0;
}
.news-b {
    
	padding-top: 15px ;
}
.news-b li {
    
	height: 23px;
	line-height: 23px;
}
.expand {
    
	height: 209px;
	background-color: #fff;
	overflow: hidden; /* expand 这个宽度继承了 父亲 190宽度 */
}
.expand ul {
    
	width: 195px; /*  父亲是 190 但是里面的li 宽度超过了190 摆放不开 4个li 此时 让ul 宽度变大 */ 
}
.expand  li {
    
	width: 47px;
	height: 69px;
	border-right: 1px solid #ccc;
	border-bottom: 1px solid #ccc;
	float: left;
}
.expand  li a {
    
	display: block;
	padding-top: 15px;
	text-align: center;
}
.expand  li i {
    
	display: block;
	margin: 0 auto;
	margin-bottom: 10px;
	background: url(../images/sprite_fs@1x.png) no-repeat;
	width: 18px;
	height: 23px;
	background-position: -5px -88px;
}
.expand  li:first-child i {
    
	width: 18px;
	height: 23px;
	background-position: -5px -88px;
}

(3)、normalize部分

/*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */
/*
http://necolas.github.io/normalize.css/
*/
/**
 * 1. Change the default font family in all browsers (opinionated).
 * 2. Correct the line height in all browsers.
 * 3. Prevent adjustments of font size after orientation changes in
 *    IE on Windows Phone and in iOS.
 */

/* Document
   ========================================================================== */

html {
    
    font-family: sans-serif; /* 1 */
    line-height: 1.15; /* 2 */
    -ms-text-size-adjust: 100%; /* 3 */
    -webkit-text-size-adjust: 100%; /* 3 */
}

/* Sections
   ========================================================================== */

/**
 * Remove the margin in all browsers (opinionated).
 */

body {
    
    margin: 0;
}

/**
 * Add the correct display in IE 9-.
 */

article,
aside,
footer,
header,
nav,
section {
    
    display: block;
}

/**
 * Correct the font size and margin on `h1` elements within `section` and
 * `article` contexts in Chrome, Firefox, and Safari.
 */

h1 {
    
    font-size: 2em;
    margin: 0.67em 0;
}

/* Grouping content
   ========================================================================== */

/**
 * Add the correct display in IE 9-.
 * 1. Add the correct display in IE.
 */

figcaption,
figure,
main {
     /* 1 */
    display: block;
}

/**
 * Add the correct margin in IE 8.
 */

figure {
    
    margin: 1em 40px;
}

/**
 * 1. Add the correct box sizing in Firefox.
 * 2. Show the overflow in Edge and IE.
 */

hr {
    
    box-sizing: content-box; /* 1 */
    height: 0; /* 1 */
    overflow: visible; /* 2 */
}

/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */

pre {
    
    font-family: monospace, monospace; /* 1 */
    font-size: 1em; /* 2 */
}

/* Text-level semantics
   ========================================================================== */

/**
 * 1. Remove the gray background on active links in IE 10.
 * 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
 */

a {
    
    background-color: transparent; /* 1 */
    -webkit-text-decoration-skip: objects; /* 2 */
}

/**
 * Remove the outline on focused links when they are also active or hovered
 * in all browsers (opinionated).
 */

a:active,
a:hover {
    
    outline-width: 0;
}

/**
 * 1. Remove the bottom border in Firefox 39-.
 * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
 */

abbr[title] {
    
    border-bottom: none; /* 1 */
    text-decoration: underline; /* 2 */
    text-decoration: underline dotted; /* 2 */
}

/**
 * Prevent the duplicate application of `bolder` by the next rule in Safari 6.
 */

b,
strong {
    
    font-weight: inherit;
}

/**
 * Add the correct font weight in Chrome, Edge, and Safari.
 */

b,
strong {
    
    font-weight: bolder;
}

/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */

code,
kbd,
samp {
    
    font-family: monospace, monospace; /* 1 */
    font-size: 1em; /* 2 */
}

/**
 * Add the correct font style in Android 4.3-.
 */

dfn {
    
    font-style: italic;
}

/**
 * Add the correct background and color in IE 9-.
 */

mark {
    
    background-color: #ff0;
    color: #000;
}

/**
 * Add the correct font size in all browsers.
 */

small {
    
    font-size: 80%;
}

/**
 * Prevent `sub` and `sup` elements from affecting the line height in
 * all browsers.
 */

sub,
sup {
    
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sub {
    
    bottom: -0.25em;
}

sup {
    
    top: -0.5em;
}

/* Embedded content
   ========================================================================== */

/**
 * Add the correct display in IE 9-.
 */

audio,
video {
    
    display: inline-block;
}

/**
 * Add the correct display in iOS 4-7.
 */

audio:not([controls]) {
    
    display: none;
    height: 0;
}

/**
 * Remove the border on images inside links in IE 10-.
 */

img {
    
    border-style: none;
}

/**
 * Hide the overflow in IE.
 */

svg:not(:root) {
    
    overflow: hidden;
}

/* Forms
   ========================================================================== */

/**
 * 1. Change the font styles in all browsers (opinionated).
 * 2. Remove the margin in Firefox and Safari.
 */

button,
input,
optgroup,
select,
textarea {
    
    font-family: sans-serif; /* 1 */
    font-size: 100%; /* 1 */
    line-height: 1.15; /* 1 */
    margin: 0; /* 2 */
}

/**
 * Show the overflow in IE.
 * 1. Show the overflow in Edge.
 */

button,
input {
     /* 1 */
    overflow: visible;
}

/**
 * Remove the inheritance of text transform in Edge, Firefox, and IE.
 * 1. Remove the inheritance of text transform in Firefox.
 */

button,
select {
     /* 1 */
    text-transform: none;
}

/**
 * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
 *    controls in Android 4.
 * 2. Correct the inability to style clickable types in iOS and Safari.
 */

button,
html [type="button"], /* 1 */
[type="reset"],
[type="submit"] {
    
    -webkit-appearance: button; /* 2 */
}

/**
 * Remove the inner border and padding in Firefox.
 */

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
    
    border-style: none;
    padding: 0;
}

/**
 * Restore the focus styles unset by the previous rule.
 */

button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
    
    outline: 1px dotted ButtonText;
}

/**
 * Change the border, margin, and padding in all browsers (opinionated).
 */

fieldset {
    
    border: 1px solid #c0c0c0;
    margin: 0 2px;
    padding: 0.35em 0.625em 0.75em;
}

/**
 * 1. Correct the text wrapping in Edge and IE.
 * 2. Correct the color inheritance from `fieldset` elements in IE.
 * 3. Remove the padding so developers are not caught out when they zero out
 *    `fieldset` elements in all browsers.
 */

legend {
    
    box-sizing: border-box; /* 1 */
    color: inherit; /* 2 */
    display: table; /* 1 */
    max-width: 100%; /* 1 */
    padding: 0; /* 3 */
    white-space: normal; /* 1 */
}

/**
 * 1. Add the correct display in IE 9-.
 * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
 */

progress {
    
    display: inline-block; /* 1 */
    vertical-align: baseline; /* 2 */
}

/**
 * Remove the default vertical scrollbar in IE.
 */

textarea {
    
    overflow: auto;
}

/**
 * 1. Add the correct box sizing in IE 10-.
 * 2. Remove the padding in IE 10-.
 */

[type="checkbox"],
[type="radio"] {
    
    box-sizing: border-box; /* 1 */
    padding: 0; /* 2 */
}

/**
 * Correct the cursor style of increment and decrement buttons in Chrome.
 */

[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
    
    height: auto;
}

/**
 * 1. Correct the odd appearance in Chrome and Safari.
 * 2. Correct the outline style in Safari.
 */

[type="search"] {
    
    -webkit-appearance: textfield; /* 1 */
    outline-offset: -2px; /* 2 */
}

/**
 * Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
 */

[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
    
    -webkit-appearance: none;
}

/**
 * 1. Correct the inability to style clickable types in iOS and Safari.
 * 2. Change font properties to `inherit` in Safari.
 */

::-webkit-file-upload-button {
    
    -webkit-appearance: button; /* 1 */
    font: inherit; /* 2 */
}

/* Interactive
   ========================================================================== */

/*
 * Add the correct display in IE 9-.
 * 1. Add the correct display in Edge, IE, and Firefox.
 */

details, /* 1 */
menu {
    
    display: block;
}

/*
 * Add the correct display in all browsers.
 */

summary {
    
    display: list-item;
}

/* Scripting
   ========================================================================== */

/**
 * Add the correct display in IE 9-.
 */

canvas {
    
    display: inline-block;
}

/**
 * Add the correct display in IE.
 */

template {
    
    display: none;
}

/* Hidden
   ========================================================================== */

/**
 * Add the correct display in IE 10-.
 */

[hidden] {
    
    display: none;
}
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/m0_46374969/article/details/111460667

智能推荐

从零开始搭建Hadoop_创建一个hadoop项目-程序员宅基地

文章浏览阅读331次。第一部分:准备工作1 安装虚拟机2 安装centos73 安装JDK以上三步是准备工作,至此已经完成一台已安装JDK的主机第二部分:准备3台虚拟机以下所有工作最好都在root权限下操作1 克隆上面已经有一台虚拟机了,现在对master进行克隆,克隆出另外2台子机;1.1 进行克隆21.2 下一步1.3 下一步1.4 下一步1.5 根据子机需要,命名和安装路径1.6 ..._创建一个hadoop项目

心脏滴血漏洞HeartBleed CVE-2014-0160深入代码层面的分析_heartbleed代码分析-程序员宅基地

文章浏览阅读1.7k次。心脏滴血漏洞HeartBleed CVE-2014-0160 是由heartbeat功能引入的,本文从深入码层面的分析该漏洞产生的原因_heartbleed代码分析

java读取ofd文档内容_ofd电子文档内容分析工具(分析文档、签章和证书)-程序员宅基地

文章浏览阅读1.4k次。前言ofd是国家文档标准,其对标的文档格式是pdf。ofd文档是容器格式文件,ofd其实就是压缩包。将ofd文件后缀改为.zip,解压后可看到文件包含的内容。ofd文件分析工具下载:点我下载。ofd文件解压后,可以看到如下内容: 对于xml文件,可以用文本工具查看。但是对于印章文件(Seal.esl)、签名文件(SignedValue.dat)就无法查看其内容了。本人开发一款ofd内容查看器,..._signedvalue.dat

基于FPGA的数据采集系统(一)_基于fpga的信息采集-程序员宅基地

文章浏览阅读1.8w次,点赞29次,收藏313次。整体系统设计本设计主要是对ADC和DAC的使用,主要实现功能流程为:首先通过串口向FPGA发送控制信号,控制DAC芯片tlv5618进行DA装换,转换的数据存在ROM中,转换开始时读取ROM中数据进行读取转换。其次用按键控制adc128s052进行模数转换100次,模数转换数据存储到FIFO中,再从FIFO中读取数据通过串口输出显示在pc上。其整体系统框图如下:图1:FPGA数据采集系统框图从图中可以看出,该系统主要包括9个模块:串口接收模块、按键消抖模块、按键控制模块、ROM模块、D.._基于fpga的信息采集

微服务 spring cloud zuul com.netflix.zuul.exception.ZuulException GENERAL-程序员宅基地

文章浏览阅读2.5w次。1.背景错误信息:-- [http-nio-9904-exec-5] o.s.c.n.z.filters.post.SendErrorFilter : Error during filteringcom.netflix.zuul.exception.ZuulException: Forwarding error at org.springframework.cloud..._com.netflix.zuul.exception.zuulexception

邻接矩阵-建立图-程序员宅基地

文章浏览阅读358次。1.介绍图的相关概念  图是由顶点的有穷非空集和一个描述顶点之间关系-边(或者弧)的集合组成。通常,图中的数据元素被称为顶点,顶点间的关系用边表示,图通常用字母G表示,图的顶点通常用字母V表示,所以图可以定义为:  G=(V,E)其中,V(G)是图中顶点的有穷非空集合,E(G)是V(G)中顶点的边的有穷集合1.1 无向图:图中任意两个顶点构成的边是没有方向的1.2 有向图:图中..._给定一个邻接矩阵未必能够造出一个图

随便推点

MDT2012部署系列之11 WDS安装与配置-程序员宅基地

文章浏览阅读321次。(十二)、WDS服务器安装通过前面的测试我们会发现,每次安装的时候需要加域光盘映像,这是一个比较麻烦的事情,试想一个上万个的公司,你天天带着一个光盘与光驱去给别人装系统,这将是一个多么痛苦的事情啊,有什么方法可以解决这个问题了?答案是肯定的,下面我们就来简单说一下。WDS服务器,它是Windows自带的一个免费的基于系统本身角色的一个功能,它主要提供一种简单、安全的通过网络快速、远程将Window..._doc server2012上通过wds+mdt无人值守部署win11系统.doc

python--xlrd/xlwt/xlutils_xlutils模块可以读xlsx吗-程序员宅基地

文章浏览阅读219次。python–xlrd/xlwt/xlutilsxlrd只能读取,不能改,支持 xlsx和xls 格式xlwt只能改,不能读xlwt只能保存为.xls格式xlutils能将xlrd.Book转为xlwt.Workbook,从而得以在现有xls的基础上修改数据,并创建一个新的xls,实现修改xlrd打开文件import xlrdexcel=xlrd.open_workbook('E:/test.xlsx') 返回值为xlrd.book.Book对象,不能修改获取sheett_xlutils模块可以读xlsx吗

关于新版本selenium定位元素报错:‘WebDriver‘ object has no attribute ‘find_element_by_id‘等问题_unresolved attribute reference 'find_element_by_id-程序员宅基地

文章浏览阅读8.2w次,点赞267次,收藏656次。运行Selenium出现'WebDriver' object has no attribute 'find_element_by_id'或AttributeError: 'WebDriver' object has no attribute 'find_element_by_xpath'等定位元素代码错误,是因为selenium更新到了新的版本,以前的一些语法经过改动。..............._unresolved attribute reference 'find_element_by_id' for class 'webdriver

DOM对象转换成jQuery对象转换与子页面获取父页面DOM对象-程序员宅基地

文章浏览阅读198次。一:模态窗口//父页面JSwindow.showModalDialog(ifrmehref, window, 'dialogWidth:550px;dialogHeight:150px;help:no;resizable:no;status:no');//子页面获取父页面DOM对象//window.showModalDialog的DOM对象var v=parentWin..._jquery获取父window下的dom对象

什么是算法?-程序员宅基地

文章浏览阅读1.7w次,点赞15次,收藏129次。算法(algorithm)是解决一系列问题的清晰指令,也就是,能对一定规范的输入,在有限的时间内获得所要求的输出。 简单来说,算法就是解决一个问题的具体方法和步骤。算法是程序的灵 魂。二、算法的特征1.可行性 算法中执行的任何计算步骤都可以分解为基本可执行的操作步,即每个计算步都可以在有限时间里完成(也称之为有效性) 算法的每一步都要有确切的意义,不能有二义性。例如“增加x的值”,并没有说增加多少,计算机就无法执行明确的运算。 _算法

【网络安全】网络安全的标准和规范_网络安全标准规范-程序员宅基地

文章浏览阅读1.5k次,点赞18次,收藏26次。网络安全的标准和规范是网络安全领域的重要组成部分。它们为网络安全提供了技术依据,规定了网络安全的技术要求和操作方式,帮助我们构建安全的网络环境。下面,我们将详细介绍一些主要的网络安全标准和规范,以及它们在实际操作中的应用。_网络安全标准规范