Author:Mr.柳上原
- 付出不亚于任何的努力
- 愿我们所有的努力,都不会被生活辜负
- 不忘初心,方得始终
不要忘记自己当初学前端的目的
......
html部分:
前端59期html+css结业《努比亚商城》
-
最新产品
查看全部手机»
-
-
Z11极光蓝
激光蓝
一探究竟
-
nobia z11 miniS
手机摄影专家
一探究竟
-
nobia z11咖啡金
无边框旗舰手机
一探究竟
-
nobia z11 Max
大不同
-
nobia z11 mini
小世界大精彩
-
精选配件
查看全部配件»
-
-
努比亚快充移动电源
-
努比亚圆铁耳机
-
努比亚快炫美自拍杆
-
nubia摄影三脚架
css部分1,base.css:
@charset "utf-8";
/* 清空默认样式 */
html{
color:#000;
background:#FFF;
}
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{
margin:0;
padding:0;
}
table{
border-collapse:collapse;
border-spacing:0;
}
fieldset,img{
border:0;
}
address,caption,cite,code,dfn,em,strong,th,var{
font-style:normal;
font-weight:normal;
}
ol,ul{
list-style:none;
}
caption,th{
text-align:left;
}
h1,h2,h3,h4,h5,h6{
font-size:100%;
font-weight:normal;
}
q:before,q:after{
content:'';
}
abbr,acronym{
border:0;
font-variant:normal;
}
sup{
vertical-align:text-top;
}
sub{
vertical-align:text-bottom;
}
input,textarea,select{
font-family:inherit;
font-size:inherit;
font-weight:inherit;
*font-size:100%;
}
legend{
color:#000;
}
a{
text-decoration:none;
color:#999;
}
/*设置全局样式*/
body{
font-family: "微软雅黑";
font-size: 12px;
color: #999;
background-color: #f5f5f5;
}
css部分2,index.css:
@charset "utf-8";
/* 头部开始 */
.top{
height:60px;
background-color:black;
}
.top .top_in{
width:1200px;
height:100%;
margin:0px auto;
}
.top .top_left{
float:left;
height:100%;
width:190px;
overflow:hidden;
}
.top .top_left > h1{
width:100%;
height:100%;
}
.top .top_left > h1 a{
display:inline-block;
width:100%;
height:100%;
background:url('../images/nubia-logo.png');
}
.top .top_right{
float:right;
height:100%;
width:740px;
}
.top .top_nav{
float:left;
width:550px;
height:100%;
}
.top .top_nav > li{
float:left;
}
.top .top_nav > li > a{
font-size:16px;
font-weight:bold;
color:#ccc;
text-align:center;
line-height:60px;
margin-left:40px;
}
.top ul > li > a:hover{
color:#e82707;
}
.top .top_login{
float:right;
width:150px;
height:100%;
}
.top .top_login > li{
float:right;
text-align:center;
line-height:60px;
margin-left:10px;
}
.top .top_login > li:nth-child(3){
width:30px;
height:30px;
background:url('../images/nubia-syb-all.png');
margin-top:15px;
}
.top .top_login > li > a{
font-size:16px;
font-weight:bold;
color:#ccc;
}
/* 广告区 */
.banner{
height:860px;
}
.banner .nav_out{
width:100%;
height:121px;
position:absolute;
background-color:#fff;
z-index:998;
}
.banner .nav{
height:121px;
width:1200px;
margin:0px auto;
}
.banner .nav > ul{
width:100%;
height:100%;
margin:0px auto;
padding-left:75px;
padding-right:75px;
box-sizing:border-box;
}
.banner .nav > ul > li{
float:left;
width:150px;
height:100%;
text-align:center;
}
.banner .nav > ul > li img{
width:120px;
height:80px;
margin-top:15px;
}
.banner .nav > ul > li:hover{
border-bottom:2px solid red;
box-sizing:border-box;
}
.banner .figure{
height:600px;
width:100%;
background-color:#fff;
text-align:center;
overflow:hidden;
position:relative;
}
.banner .figure > img{
height:100%;
margin:0px -100%;
}
.banner .figure > ol{
width:150px;
height:20px;
position:absolute;
left:50%;
margin-left:-75px;
bottom:10px;
}
.banner .figure > ol > li{
border-radius:50%;
float:left;
width:8px;
height:8px;
background-color:#cccccc;
margin-left:15px;
border:2px solid transparent;
transition:border 1s;
}
.banner .figure > ol > li:hover{
border:2px solid red;
background-color:transparent;
transform:scale(1.2,1.2);
}
.banner .video{
width:1200px;
height:250px;
margin:0 auto;
margin-top:10px;
background-color:#ff6247;
}
.banner .video > ul{
width:100%;
height:100%;
background-color:forestgreen;
}
.banner .video > ul > li{
width:396px;
height:250px;
float:left;
margin-right:3px;
text-align:center;
overflow:hidden;
position:relative;
background-color:black;
}
.banner .video > ul > li > img{
height:100%;
margin:0 -100%;
}
.banner .video .video_info{
width:100%;
height:155px;
position:absolute;
bottom:0;
opacity:0;
transition:opacity 1s;
}
.banner .video .video_info > h3{
font-size:16px;
line-height:40px;
color:white;
}
.banner .video .video_info > p{
color:white;
}
.banner .video > ul > li:hover .video_info{
opacity:1;
}
.banner .video > ul > li:hover >img{
opacity:0.5;
}
.banner .video > ul > li:hover .video_info >img{
animation:sport 2s .5s ease-in-out infinite;
}
@keyframes sport{
20%{transform: scale(.8);}
40%{transform: scale(1.2);}
60%{transform: scale(.9);}
80%{transform: scale(1);}
100%{transform: scale(1);}
}
/* 内容区 */
.content{
height:1883px;
}
.content > dl{
width:1200px;
height:100%;
margin:0 auto;
overflow:hidden;
}
.content > dl > dt{
text-align:center;
margin-top:40px;
margin-bottom:30px;
}
.content > dl > dt > h3{
font-size:35px;
color:#333;
margin-bottom:20px;
}
.content > dl > dt > p{
color:#e8304e;
margin-top:20px;
}
.content .content_phone{
width:1200px;
height:1200px;
}
.content .content_phone > li{
float:left;
background-color:#fff;
position:relative;
overflow:hidden;
}
.content .content_phone > li:nth-child(1){
width:1200px;
height:395px;
margin-bottom:10px;
}
.content .content_phone > li:nth-child(2){
width:395px;
height:795px;
margin-right:10px;
}
.content .content_phone > li:nth-child(3){
width:795px;
height:390px;
margin-bottom:10px;
}
.content .content_phone > li:nth-child(4){
width:390px;
height:395px;
margin-right:10px;
}
.content .content_phone > li:nth-child(5){
width:395px;
height:395px;
}
.content .content_phone > li > img{
width:100%;
transition:all 1s;
}
.content .content_phone > li:nth-child(1) > img{
margin-top:60px;
}
.content .content_phone .phone_des{
width:200px;
position:absolute;
left:50%;
margin-left:-100px;
bottom:10px;
text-align:center;
}
.content .content_phone .phone_des > h4{
font-size:20px;
color:#000;
}
.content .content_phone .phone_des > p{
font-size:15px;
margin-bottom:10px;
color:#999999;
}
.content .content_phone .phone_des > span{
display:inline-block;
width:108px;
height:32px;
text-align:center;
line-height:32px;
border:1px solid #ccc;
border-radius:10px;
color:#000;
}
.content .content_phone > li:nth-child(1) .phone_des{
left:0%;
margin-left:800px;
bottom:150px ;
}
.content .content_phone > li:nth-child(1) img{
margin-left:-100px;
}
.content .content_phone > li:nth-child(1):hover img {
margin-left:0;
}
.content .content_phone > li:nth-child(3) img{
margin-left:100px;
}
.content .content_phone > li:nth-child(3):hover img {
margin-left:0;
}
.content .content_phone > li:hover .img_scale{
transform:scale(1.2,1.2);
}
.content .content_product{
width:1200px;
height:300px;
display:flex;
justify-content:space-between;
}
.content .content_product > li{
width:295px;
height:300px;
float:left;
background-color:white;
margin-left:4px;
overflow:hidden;
}
.content .content_product > li > img{
width:100%;
transition:all 1s;
}
.content .content_product > li > p{
margin-top:20px;
text-align:center;
}
.content .content_product > li:hover img{
transform:scale(1.2,1.2);
}
/* 底部区 */
.footer{
height:396px;
}
.footer .footer_top{
width:1200px;
border-top:1px solid #ccc;
margin:0 auto;
}
.footer .footer_content{
margin-top:20px;
padding-left:100px;
overflow:hidden;
}
.footer .footer_content > dl{
float:left;
width:200px;
}
.footer .footer_content > dl > dt{
color:#000;
font-size:14px;
line-height:30px;
}
.footer .footer_content > dl > dd{
line-height:20px;
}
.footer .footer_content > dl > dd a:hover{
color:red;
}
.footer .footer_copyright{
list-style:none;
float:left;
margin-top:10px;
}
.footer .footer_copyright > li{
float:left;
padding:10px;
font-size:10px;
margin-left:10px;
}
.footer .footer_copyright > li:hover a{
color:#000;
}
.footer .footer_social{
float:left;
margin-left:50px;
list-style:none;
margin-top:10px;
font-size:20px;
}
.footer .footer_social > li{
float:left;
width:30px;
height:30px;
margin-right:10px;
}
.footer .footer_social > li a{
display:inline-block;
width:30px;
height:30px;
background:url('../images/nubia-syb-all.png');
}
.footer .footer_social > li:nth-child(1) a{
background-position:-246px 0;
}
.footer .footer_social > li:nth-child(2) a{
background-position:-186px 0;
}
.footer .footer_social > li:nth-child(3) a{
background-position:-126px 0;
}
.footer .footer_social > li:nth-child(4) a{
background-position:-156px 0;
}
.footer .footer_info{
float:left;
font-size:10px;
line-height:30px;
}
.footer .footer_bottom{
width:740px;
margin:0px auto;
}