[练手]前端-小米官网

小米官网

html代码





	小米
	
	


	
	
	
				
	

小米闪购

米家小相机

清晰捕捉

649元699元

米家小相机

清晰捕捉

649元699元

米家小相机

清晰捕捉

649元699元

米家小相机

清晰捕捉

649元699元


CSS代码

*{
	margin: -1px;
	padding: 0px;
}
.topbar{
	height: 40px;
	background-color: rgb(51,51,51);
}
.container{
	width: 1226px;
	height: 100%;
	margin: 0px auto;
}
li{
	list-style-type: none;
}
a{
	
	text-decoration: none;
}
.topbar a{
	color: rgb(176,176,176);

}
.topbar-left li{
	float: left;
	line-height: 40px;
}
.topbar-left a{
	border-right: 1px solid #424242;
	padding-right: 10px;
	padding-left:10px;
	font-size: 12px;
}

.topbar-left a:hover{

	color: #fff;

}
.topbar-right{
	position:absolute;
	left:1100px;
	top:0px;
	
}
.topbar-right a{
	line-height: 40px;
	margin-right: 10px;
	border-right:1px solid #42 ;
	padding-right: 10px;

}
.topbar-right a:hover{
	color:#fff;
}
.header .container {
	height: 100px;
	
}
.header .logo{
	margin-top: 21.5px;
	width: 234px;
	margin-left: -60px;
}
.header .logo, .header .nav{
	float: left;
}
.header a{
	color: black;
	line-height: 100px;

}
/*.header .nav{
	position:absolute;
	left:400px;
	top:50px;
}*/
.header .nav li{
	float: left;
	margin-right: 20px;
}
.header .container .nav ul li .xiala{
	width: 100%;
	height: 0px;
	background-color: black;
	position: absolute;
	top: 0px;
	left: 0px;
	transition: height 0.5s;
}
.logo {
	float: left;
}
.header a: hover{
	color: #ff6700;
}
.header .search input{
	height: 40px;
	margin-top:  25px;
	border: 1px solid gray;
	font-size: 18px;
	opacity:0.5;
}
input[type="submit"]{
	background-color:#fff;
	position: relative;
	top: 2px;
	right: 0px; 
}
.header .search{
	position:absolute;
	left:1100px;
	top:50px;
	
}
.header .search:hover input{
	border-color: #FF6700 ;
}
.content .container img{
	width: 1226px;
	height: 460px;
}
.content .container .content-nav{
	
	height: 460px;
	width: 234px;
	background-color:grey;
	position: absolute;
	left: 0px;
	top:0px;
	background-color: rgba(0,0,0,0.3);
	
}

.content .container .content-nav ul li .leftdonghua{
	position: absolute;
	left: 381px;
	top:136px;
	height: 460px;
	width: 600px;
	background-color:grey;
	z-index: 2;
	display: none;
}
.content .container .content-nav li:hover{
	display: block;
}
.content .container{
	position: relative;
}



.content .content-nav a{
	color: #FFFFFF;
	
}
.content .content-nav li{
	padding: 15px 30px;
}
.content .content-nav li:hover{
	
	z-index: 2;
	background-color: #FF6700;
}
.content .content-nav ul{
	margin-top: 15px;
}
.content.container* {
	margin: 0px;
}
.content .content-nav a span{
	float: right;
}
.items .item2 img{
	width: 306px;
	height: 209px;
}

.items .item1 , .items .item2{
	float: left;
}
.items .container .item2{
	margin-left: 5px;
}
.items .container *{
	margin: 0px;
}


.goods .item{
	width: 234px;
	height: 339px;
	background-color: white;
	margin: 5px;
	float: left;
}
.goods h2{
	margin-top: 30px;
}

.clear:after{
	content: "";
	display: block;
	clear: both;
}
.goods .item img{
	 transition: all 0.6s; 
	width: 204px;
	margin: 10px 15px;
}
.goods .item img:hover{
	 transform: scale(1.2);
}
.goods .item p{
	text-align: center;
}
.goods .item .t1{
	font-size: 14px;
}
.goods .item .t2{
	color: gray;
	font-size: 12px;
	margin: 10px 0px;
}
.goods .item .t3{
	color: red;
}
.goods .item .t3 span{
	
	color: gray;
	text-decoration: line-through;
}

你可能感兴趣的:([练手]前端-小米官网)