大部分是静态页面,使用的js知识只有一点点
小米闪购 - 小米商城
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
*小米秒杀活动规则:
1.秒杀商品是否参加活动、最终秒杀成功的商品,以订单结算页显示为准,活动包括但不限于优惠券、赠品、满减、满赠等;
2.秒杀商品数量有限,活动以下单支付成功为准,请加入购物车后尽快下单支付;
3.秒杀价不含运费,最终以订单结算页价格为准;
4.订单中商品的数量、颜色、型号等,以订单结算页为准。
温馨提示:因可能存在系统缓存、页面更新导致价格变动异常等不确定性情况出现,如您发现活动商品标价或促销信息有异常,请您立即联系小米客服,以便我们及时补正。
@font-face {
font-family: 'iconfont';
src: url('iconfont.eot');
src: url('iconfont.eot?#iefix') format('embedded-opentype'),
url('iconfont.woff2') format('woff2'),
url('iconfont.woff') format('woff'),
url('iconfont.ttf') format('truetype'),
url('iconfont.svg#iconfont') format('svg');
}
.iconfont {
font-family: "iconfont" !important;
font-size: 20px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
body,ul,li{
margin: 0;
padding: 0;
}
body{
font: 14px/1.5 "Helverica Neue";
height: 2500px;
font-style: normal;
}
ul{
list-style-type: none;
}
a{
text-decoration: none;
}
.topbar{
/* border: 1px solid black;*/
background-color: #333;
height: 40px;
}
.topbar a{
color: #b0b0b0;
font-size: 12px;
}
.topbar a:hover{
color: #fff;
}
.container{
/*border: 1px solid black;*/
margin: 0 auto;
width: 1226px;
}
.container::before,.container::after,
.clearfix::before,.clearfix::after{
content: "";
display: table;
}
.container::after,.clearfix::after{
clear: both;
}
.topbar-nav{
float: left;
height: 40px;
line-height: 40px;
font-size: 0;
}
.topbar-nav span{
font-size: 12px;
color: #b0b0b0;
font-family: sans-serif;
margin: 0.5em;
}
.topbar-info,.topbar-cart{
float: right;
}
.topbar-cart i{
font-size: 20px;
line-height: 20px;
margin-right: 4px;
vertical-align: -2px;
}
.topbar-cart a{
display: block;
height: 40px;
line-height: 40px;
text-align: center;
width: 120px;
background-color: #424242;
}
.topbar-cart a:hover{
color: #ff6700;
background-color: #fff;
}
.topbar-cart span{
margin-left: -4px;
font-size: 12px;
}
.topbar-info{
margin-right: 15px;
}
.topbar-info a{
float: left;
padding: 0 5px;
height: 40px;
line-height: 40px;
}
.topbar-info span{
float: left;
font-family: sans-serif;
font-size: 12px;
color: #b0b0b0;
height: 40px;
line-height: 40px;
}
.topbar-info.sep{
padding: 0 10px;
}
/*header的css样式*/
.header{
height: 100px;
}
.header-log{
float: left;
width: 62px;
height: 55px;
margin-top: 22px;
/* border: 1px solid red;*/
}
.header-log a,img{
display: block;
width: 60px;
height: 55px;
}
.header-log span{
display: block;
text-indent: -9992em;
}
/*header nav*/
.header-nav{
float: left;
width: 820px;
height: 100px;
/*border: 1px solid blue;*/
}
.header-nav .nav-list{
width: 820px;
height: 88px;
font-size: 20px;
padding: 12px 0 30px;
}
.header-nav .nav-list li{
float: left;
font-size: 20px;
}
.header-nav .nav-list .nav-category{
float: left;
width: 127px;
padding: 0 15px 0 0;
}
.header-nav .nav-list .nav-category a{
display: block;
text-align: right;
padding: 26px 0 38px;
color: #333;
font-size: 16px;
}
.header-nav .nav-list .nav-item a{
float: left;
display: block;
padding: 26px 10px 38px;
color: #333;
font-size: 16px;
}
.header-nav .nav-list .nav-item a:hover{
color: #ff6700;
}
.header-search{
float: right;
width: 296px;
height: 50px;
margin-top: 25px;
border-radius: 50%;
/*border: 1px solid yellow;*/
}
.header-search .search-form{
position: relative;
display: block;
width: 296px;
height: 50px;
}
.header-search .search-form .search-text{
position: absolute;
top: 0;
right: 51px;
display: block;
width: 245px;
height: 50px;
line-height: 50px;
border: ipx solid #e0e0e0;
outline: 0;
}
.header-search .search-form .search-btn{
position: absolute;
top: 0;
right: 0;
display: block;
width: 52px;
height: 50px;
line-height: 50px;
border: ipx solid #e0e0e0;
outline: 0;
font-size: 24px;
background: #fff;
color: #616161;
}
.header-search .search-form .search-btn:hover{
background: #ff6700;
}
/*sekill*/
.sekill{
background-color: #f5f5f5;
}
.sekill-head{
margin-top: 100px;
height: 120px;
background: url(../img/小米秒杀.png) no-repeat;
}
.sekill-nav{
margin: 68px 0 22px;
}
.sekill-navfixed{
position: fixed;
top: 0px;
display: block;
float: left;
color: #fff;
width: 20%;
height: 68px;
line-height: 68px;
text-align: center;
cursor: pointer;
}
.sekill-nav ul{
height: 68px;
background: #414141;
}
.sekill-nav li{
display: block;
float: left;
color: #fff;
width: 20%;
height: 68px;
line-height: 68px;
text-align: center;
cursor: pointer;
}
.sekill-nav li em{
display: inline-block;
margin-left: 30px;
font-style: normal;
font-size: 18px;
line-height: 1;
vertical-align: middle;
}
.sekill-nav li span{
display: inline-block;
margin-left: 15px;
text-align: left;
line-height: 1;
vertical-align: middle;
font-size: 14px;
font-style: normal;
}
.sekill-nav ul li span em{
font-style: normal;
display: inline-block;
font-size: 14px;
margin-left: 0;
text-align: left;
line-height: 20px;
}
.sekill-goods{
margin-top: 15px;
}
.sekill-goods .active{
display: block;
}
.sekill-goods ul{
margin-right: -13px;
display: none;
}
.sekill-goods li{
float: left;
width: 400px;
height: 190px;
background-color: #fff;
margin-right: 13px;
margin-bottom: 13px;
}
.sekill-notice{
font-size: 12px;
color: #999999;
margin-top: 100px;
margin-bottom: 35px;
font-style: normal;
}
.sekill-goods .bg{
float: left;
width: 190px;
height: 190px;
background-color: #beebe9;
}
.sekill-goods .bg img{
height: 190px;
width: 190px;
}
.sekill-goods .info{
margin-left: 210px;
width: 190px;
height: 190px;
padding-top: 12px;
}
.sekill-goods .info p{
font-style: normal;
}
.sekill-goods .info .name{
font-size: 16px;
color: #333;
height: 16px;
line-height: 16px;
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.sekill-goods .info .desc{
font-size: 12px;
line-height: 12px;
color: #b0b0b0;
margin-top: 5px;
}
.sekill-goods .info .btn{
display: inline-block;
width: 118px;
height: 28px;
font-size: 14px;
color: #fff;
line-height: 28px;
text-align: center;
background-color: #f1393a;
margin-top: 10px;
border: 1px solid #f1393a;
font-style: normal;
}
.sekill-goods .info .price del{
color: #999999;
font-size: 12px;
line-height: 12px;
margin-left: 10px;
}
.sekill-goods .info .price{
font-size: 16px;
line-height: 16px;
color: #f1393a;
margin-top: 14px;
margin-bottom: 0;
}
.sekill-goods .info .person{
font-size: 12px;
line-height: 12px;
color: #999999;
margin-top: 15px;
}
.sekill-nav .active{
background-color: #f1393a;
}
var tabs=document.getElementById("tabs").getElementsByTagName("li");
console.log(tabs);
var list=document.getElementById("lists").getElementsByTagName("ul");
console.log(list);
for( var i=0; i