淘宝静态页面CSS部分
框架样式
body,p,h1,h2,h3,h4{
margin:0;
}
ul{
margin:0;
padding:0;
list-style:none;
}
img{
border:none;
vertical-align: middle;
}
a{
text-decoration: none;
color:#3c3c3c;
}
i{
font-style: normal;
}
input{
margin:0;
padding:0;
}
button{
margin:0;
padding:0;
outline:none;
}
body{
font: 12px/1.5 tahoma,arial,'Hiragino Sans GB','\5b8b\4f53',sans-serif;
color:#3c3c3c;
background-color:#f4f4f4;
}
.clearfix::after{
content:"";
display:block;
clear:both;
}
.fl{
float:left;
}
.fr{
float:right;
}
.layer{
width:1190px;
margin:0 auto;
}
.c4{
color:#f40;
}
.c5{
color:#f50;
}
.c6{
color: #8d7afb;
}
.c7{
color: #a8c001;
}
.mt10{
margin-top: 10px;
}
.mr10{
margin-right: 10px;
}
.mr7{
margin-right: 7px;
}
.mr5{
margin-right: 5px;
}
整体样式
@import 'reset.css';
@font-face {
font-family: 'iconfont';
src: url('../taobao/font/iconfont.ttf?t=1642923044755') format('truetype');
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
#headmessage li{
float:left;
line-height: 35px;
padding:0 6px;
font-size:0;
}
#headmessage a{
color:#6c6c6c;
font-size:12px;
}
#headmessage a.login{
color:#f22e00;
}
#headmessage span{
font-size: 12px;
}
#headmessage span.arrow{
margin-left:7px;
}
#headmessage li strong{
font-size: 12px;
color:#f22e00;
}
#headmessage li a.store{
color:#9c9c9c;
}
#headmessage a:hover{
color:#f40;
}
#headmessage li.line{
font-size: 12px;
color:#ddd;
padding: 0 5px;
}
#headad{
background-color: #f12f04;
}
#headad .go{
display: block;
padding: 10px 10px 10px 15px;
}
#headad .go img{
width:80px;
height:80px;
}
#headad ul{
margin-top: 13px;
}
#headad li{
float:left;
width: 209px;
height: 75px;
margin-right: 10px;
padding: 12px 15px 0 15px;
box-sizing: border-box;
}
#headad li.item1{
background: url(images/ad1.png) no-repeat;
border-radius: 5px;
}
#headad li.item2{
background: url(images/ad2.png) no-repeat;
border-radius: 5px;
}
#headad li.item3{
background: url(images/ad3.png) no-repeat;
border-radius: 5px;
}
#headad li.item4{
background: url(images/ad4.png) no-repeat;
border-radius: 5px;
}
#headad li.item5{
background: url(images/ad5.png) no-repeat;
border-radius: 5px;
margin-right: 0;
}
#headad li h3{
font-size: 20px;
line-height: 28px;
}
#headad li a{
color:#fff;
display: block;
}
#headad li a img{
width: 52px;
height: 52px;
border-radius: 5px;
}
#headad p{
font-size: 14px;
line-height: 20px;
}
#headsearch{
background:#fff;
padding: 24px 0 10px 0;
}
#headsearch h1 a{
display: block;
width: 190px;
height: 58px;
background: url(../taobao/images/logo3.png) center no-repeat;
text-indent: -9999px;
overflow: hidden;
margin-top: 8px;
border-radius: 5px;
}
#headsearch .code{
width: 72px;
height: 86px;
border: 1px solid #eee;
position: relative;
margin-right: 110px;
text-align: center;
}
#headsearch .code img{
width: 62px;
height: 62px;
}
#headsearch .close{
position: absolute;
left: -16px;
top: -1px;
width: 14px;
height: 14px;
font-size: 14px;
line-height: 14px;
border: 1px solid #eee;
color:#ddd;
cursor: pointer;
}
#headsearch .search{
width: 630px;
margin: 0 auto;
}
#headsearch .searchtab{
height: 22px;
padding-left: 17px;
}
#headsearch .searchtab li{
float: left;
width: 36px;
line-height: 22px;
margin-right: 4px;
text-align: center;
color:#f40;
cursor: pointer;
}
#headsearch .searchtab li.active{
background: #f40;
color:#fff;
font-weight: bold;
background-image: linear-gradient(to right,#ff9000,#ff5000);
border-radius: 6px 6px 0 0;
}
#headsearch .searchtab li:hover{
background-color:#ffeee5;
}
#headsearch .searchcontent{
height: 40px;
}
#headsearch .searchbox{
width: 554px;
height: 40px;
box-sizing: border-box;
border: 2px solid #ff5000;
border-right: none;
border-radius: 20px 0 0 20px;
overflow: hidden;
position: relative;
}
#headsearch .searchbox input{
width: 490px;
height: 36px;
line-height: 36px;
outline: none;
border: none;
text-indent: 10px;
position: absolute;
z-index: 2;
background-color: transparent;
}
#headsearch .searchbox .placeholder{
position: absolute;
top: 6px;
left: 16px;
}
#headsearch .placeholder span{
color: #9c9c9c;
vertical-align: 1px;
}
#headsearch .imgsearch{
position: absolute;
right: 20px;
font-size: 28px;
color: #9c9c9c;
top: -3px;
cursor: pointer;
}
#headsearch .searchcontent button{
width: 74px;
height: 40px;
text-align: center;
font-size: 18px;
line-height: 40px;
color: #fff;
border: none;
background-image: linear-gradient(to right,#ff9000,#ff5000);
border-radius: 0 20px 20px 0;
cursor: pointer;
}
#headsearch .hotkey{
height: 25px;
line-height: 25px;
}
#headsearch .hotkey a:hover{
color: #f50;
}
#nav h2{
width: 190px;
height: 30px;
line-height: 30px;
font-size: 16px;
color: #fff;
text-align: center;
background-color: #f50;
}
#nav ul{
margin-left: 190px;
height: 30px;
background-image: linear-gradient(to right,#ff9000,#ff5000);
}
#nav ul li{
float: left;
line-height: 30px;
margin: 0 7px;
font-size: 14px;
position: relative;
padding: 0 5px;
}
#nav ul li.size{
font-size: 16px;
}
#nav ul li a{
color: #fff;
font-weight: bold;
}
#nav ul li.line{
color: #fff;
margin: 0;
padding: 0;
}
#nav ul li:hover::before{
content: "";
position: absolute;
width: 23px;
height: 13px;
background-image: url(../taobao/images/tgzlogo2.png);
top: -13px;
left: 50%;
margin-left: -12px;
}
#firstscreen .firstleft{
width: 890px;
}
.firstleft .sidenav{
width: 190px;
height: 522px;
background: #fff;
border: 1px solid #f50000;
box-sizing: border-box;
border-top: none;
padding-top: 5px;
}
.firstleft .sidenav li{
height: 32px;
line-height: 32px;
padding-left: 25px;
transition: background-color 0.3s;
}
.firstleft .sidenav li:hover{
background: #ffe4dc;
color: #f50;
}
.firstleft .sidenav li:hover a{
color: #f50;
}
.firstleft .sidenav a:hover{
text-decoration: underline;
}
.firstleft .sidenav li a{
font-size: 14px;
color: #666;
}
.firstleft .sidenav li span{
margin-right: 5px;
}
.firstleft .img1box{
width: 690px;
height: 282px;
margin-top: 10px;
}
.firstleft .pic{
width: 520px;
position: relative;
}
.firstleft .pic button{
width: 20px;
height: 30px;
line-height: 30px;
cursor: pointer;
border: none;
color: #fff;
background-color: rgba(0,0,0,0.3);
position: absolute;
top: 50%;
margin-top: -15px;
display: none;
}
.firstleft .pic button.leftbt{
left: 0;
border-radius: 0 15px 15px 0;
}
.firstleft .pic button.rightbt{
right: 0;
border-radius: 15px 0 0 15px;
}
.firstleft .pic:hover button{
display: block;
}
.firstleft .pic .circle{
position: absolute;
bottom: 15px;
left: 50%;
border-radius: 10px;
padding: 3px 0;
font-size: 0;
margin-left: -35px;
background-color: rgba(255,255,255,0.3);
}
.firstleft .pic .circle span{
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
background-color: #fff;
margin: 0 3px;
cursor: pointer;
}
.firstleft .pic .circle span.active{
background-color: #ff5000;
}
.firstleft .ad{
width: 160px;
}
.firstleft .ad img{
width: 160px;
}
.firstleft .img2box{
width: 690px;
height: 220px;
margin-top: 10px;
}
.firstleft .img2box .pictt{
height: 20px;
}
.firstleft .img2box .pictt .text{
height: 17px;
line-height: 17px;
}
.firstleft .img2box .pictt .text .bg{
background: url(images/tm.png) no-repeat left;
padding-left: 79px;
}
.firstleft .img2box .pictt .text i{
color: #ff1648;
}
.firstleft .img2box .pictt .line{
height: 3px;
background-color: #ff1648;
position: relative;
}
.firstleft .img2box .pictt .line span{
width: 87px;
height: 3px;
background-color: #000;
position: absolute;
left: 0;
}
.firstleft .img2box .img{
width: 520px;
height: 200px;
background-color: #fff;
position: relative;
display: table-cell;
vertical-align: middle;
}
.firstleft .img2box .img img{
margin: 0 10px;
}
.firstleft .img2box .ad .title{
height: 20px;
line-height: 20px;
}
.firstleft .img2box .ad img{
height: 200px;
width: 160px;
}
.firstleft .news{
width: 890px;
height: 100px;
background: #fff;
margin-top: 10px;
box-sizing: border-box;
padding: 13px 13px 13px 20px;
}
.firstleft .news .hd{
margin-top:7px;
}
.firstleft .news .hd h3{
width: 170px;
height: 38px;
background: url(images/tbtt2.png) no-repeat;
text-indent: -9999px;
overflow: hidden;
}
.firstleft .news .hd p{
color: #999;
line-height: 24px;
}
.firstleft .news .newlist{
width: 680px;
position: relative;
}
.firstleft .news .newlist .img{
margin-right: 15px;
}
.firstleft .news .newlist .img img{
width: 130px;
height: 73px;
}
.firstleft .news .newlist h4{
line-height: 28px;
font-size: 16px;
font-weight: normal;
}
.firstleft .news .newlist h4 a{
color: #333;
}
.firstleft .news .newlist h4 a:hover{
color: #ff5000;
}
.firstleft .news .newlist p{
line-height: 18px;
font-size: 14px;
}
.firstleft .news .newlist p a{
color: #999;
}
.firstleft .news .newlist .more{
position: absolute;
top: 0;
right: 0;
color: #999;
}
.firstleft .news .newlist .more:hover{
color: #ff5000;
}
#firstscreen .firstright{
width: 290px;
margin-top: 10px;
}
.firstright .user{
height: 140px;
background: #fff;
padding-top: 5px;
}
.firstright .user .avatar{
display: block;
width: 50px;
height: 50px;
margin: 0 auto;
text-align: center;
border-radius: 50%;
overflow: hidden;
}
.firstright .user .avatar img{
width: 50px;
height: 50px;
}
.firstright .user .username{
text-align: center;
line-height: 16px;
}
.firstright .user .bt{
text-align: center;
}
.firstright .user .bt button{
width: 75px;
height: 32px;
line-height: 32px;
margin: 12px 2px 0 2px;
color: #fff;
border-radius: 4px;
border: none;
background-image: linear-gradient(to right,#ff9000,#ff5000);
cursor: pointer;
}
.firstright .user .bt button.login{
width: 95px;
}
.firstright .tipoff{
display: block;
height: 26px;
line-height: 26px;
color: #f40;
background: #ffe4dc;
text-align: center;
}
.firstright .tipoff i{
font-size: 12px;
vertical-align: 1px;
position: relative;
left: 30px;
}
.firstright .notice{
height: 108px;
background-color: #fff;
}
.firstright .notice .title{
text-align: center;
font-size: 0;
padding-top: 10px;
}
.firstright .notice .title li{
display: inline-block;
font-size: 12px;
line-height: 20px;
padding: 0 4px;
margin: 0 10px;
}
.firstright .notice .title li.active{
font-weight: bold;
border-bottom: 2px solid #f40;
}
.firstright .notice .title li a:hover{
color:#f40;
}
.firstright .notice .content{
margin: 0 12px;
padding-top: 10px;
}
.firstright .notice .content li{
height: 25px;
line-height: 25px;
overflow: hidden;
float: left;
width: 133px;
}
.firstright .notice .content li a:hover{
color: #ff5000;
}
.firstright .notice .content li.item1{
width: 100%;
color: #ff5000;
}
.firstright .notice .content li.item1 a{
color: #ff5000;
}
.firstright .ad2{
width: 290px;
height: 118px;
}
.firstright .ad2 .adcontent{
float: left;
margin-right: 6px;
margin-left: 6px;
}
.firstright .ad2 .adcontent a{
color: #3c3c3c;
}
.firstright .ad2 .adcontent .iconfont{
width: 60px;
height: 24px;
font-size: 35px;
display: inline-block;
text-align: center;
}
.firstright .ad2 .adcontent p{
font-size: 16px;
color: #333;
width: 60px;
line-height: 17px;
text-align: center;
}
.firstright .ad2 .adcontent a:hover{
color: #ff5000;
}
.firstright .app{
height: 111px;
background: #fff;
}
.firstright .app .title{
height: 30px;
line-height: 30px;
}
.firstright .app h3{
font-size: 14px;
padding-left: 14px;
}
.firstright .app a{
margin-right: 10px;
}
.firstright .app a:hover{
color: #f40;
}
.firstright .app .appicon{
text-align: center;
font-size: 0;
}
.firstright .app .appicon li{
width: 32px;
width: 32px;
display: inline-block;
margin: 0 10px 8px 10px;
}
.firstright .app .appicon li img{
width: 32px;
height: 32px;
}
#tool{
width: 50px;
height: 350px;
position: fixed;
top: 100px;
right: 40px;
}
#tool span{
font-size: 32px;
color: #ff7f13;
width: 50px;
height: 36px;
line-height: 36px;
position: absolute;
text-align: center;
top: -28px;
}
#tool div{
height: 350px;
border-radius: 8px;
overflow: hidden;
}
#tool a{
display: block;
width: 50px;
height: 50px;
text-align: center;
background: #fff;
word-break: keep-all;
position: relative;
padding-top: 6px;
box-sizing: border-box;
}
#tool a:after{
content: "";
border-bottom: 1px solid #efefef;
width: 34px;
position: absolute;
left: 8px;
bottom: 0;
}
#tool a.item6{
line-height: 40px;
}
#tool a:hover{
background-image: linear-gradient(135deg,#ff9000,#ff5000);
color: #fff;
font-weight: bold;
}
#tool a.active{
background-image: linear-gradient(135deg,#ff9000,#ff5000);
color: #fff;
font-weight: bold;
}
#tool a:hover:after{
border: none;
}
#tool a.active:after{
border: none;
}