css布局实现移动端手机端电商秒杀页面代码
代码语言:html
所属分类:布局界面
代码描述:css布局实现移动端手机端电商秒杀页面代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>秒杀</title> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> <style> *{margin: 0;padding: 0;border: 0;list-style: none;text-decoration: none;color: inherit;font-weight: normal;font-family: "微软雅黑";box-sizing: border-box;font-style: normal;outline: none;-webkit-tap-highlight-color: transparent;} body{width: 100%;overflow-x: hidden;background-image:linear-gradient(to right bottom,#fb4471,#e1221d);background-size: 100% 3.35rem;background-repeat: no-repeat;background-color: #f3f3f3;color: #ffffff;} img{vertical-align: middle;max-width: 100%;} .container{width: 100%;padding: 0 .4rem;} /*顶部标题返回*/ .top-bar{position: absolute;top: 0;left: 0;display: flex;align-items: center;width: 100%;height: 1.2rem;position: relative;padding: 0 .3rem;} .top-bar i{display: inline-block;width: .5rem;height: 1.2rem;background: url(//repo.bfw.wiki/bfwrepo/icon/5ff8f2c747054.png) left center no-repeat;background-size: .37rem .40rem;position: relative;z-index: 3;} .top-bar .title{position: absolute;height: .4rem;width: 100%;text-align: center;left: 0;font-size: .32rem;z-index: 2;} .container{width: 100%;padding: .3rem .3rem .5rem .3rem;} /* 时间段 */ .time-section{width: 100%;padding: 0 .1rem;} .time-section ul{display: flex;justify-content: space-between;align-items: center;} .time-section ul li{font-size: .34rem;display: flex;flex-direction: column;justify-content:space-between;height: .8rem;position: relative;text-align: center;} .time-section ul li span{font-weight: bold;color: #f78998;} .time-section ul li span.status{font-size: .24rem;font-weight: normal;} .time-section ul li span:last-child{margin-top: .05rem;} .time-section ul li.active span{color: #fff;} /* 推荐 */ .recommend{width: 100%;margin-top: .5rem;margin-bottom: .15rem;background: #ffffff;border-radius: .25rem;padding: .3rem .25rem .35rem .25rem;} .recommend h2{display: flex; align-items: center;color: #333333;padding-bottom: .25rem;display: flex;justify-content: space-between;} .recommend h2 span{font-size: .28rem;color: #000;padding-left: .05rem;font-weight: bold;} .recommend h2 a{font-size: .24rem;color: #e1221d;padding-right: .1rem;} .group{width: 100%;} .group.recommend .item{padding-top: 0;margin-bottom: 0rem;} .group.recommend .item ul{display: flex;justify-content: space-between;} .group.recommend .item ul li a{display: block;margin: 0 .03rem;display: flex;flex-direction: column;align-items: center;justify-content: center;} .group.recommend .item ul li img{width: 100%;padding-bottom: .15rem;} .group.recommend .item ul li span{font-size: .32rem;color: #e1221d;display: flex;align-items: baseline;} .group.recommend .item ul li span i{font-size: .24rem;} .group.recommend .item ul li p{font-size: .24rem;color: #999999;padding-top: .05rem;} /*倒计时*/ .count-down{width: 100%;display: flex;align-items: center;justify-content: space-between;color: #999999;padding: 0 .3rem;} .count-down h2{font-size: .28rem;color: #000;font-weight: bold;} .count-down .time{display: flex;align-items: center;font-size: .24rem;color: #999999;} .count-down .time i{padding-right: .2rem;} .count-down .time span{display: inline-block;padding: .05rem .07rem;font-size: .22rem;color: #FFFFFF;background: #464450;margin: 0 .06rem;border-radius: .1rem;} /* 列表 */ .goods-box{width: 100%;margin-top: .25rem;margin-bottom: .15rem;background: #ffffff;border-radius: .25rem;padding-top: .3rem;overflow: hidden;} .group.list .item{width: 100%;padding: .35rem;background: #ffffff;height: auto;overflow: hidden;display: flex;justify-content: space-between;align-items: top;border-bottom: .01rem solid #f3f3f3;} .group.list .item:last-child{border-bottom: 0;} .group.list .item .l {flex-shrink: 0;width: 1.74rem;height: 1.74rem;overflow: hidden;margin-right: .3rem;} .group.list .item .l img{width: 100%;} .group.list .item .r {width: 100%;display: flex;flex-direction: column;} .group.list .item .r .title{font-size: .26rem;color: #000;} .group.list .item .r p.subtitle{font-size: .24rem;color: #fd181d;padding-top: .1rem;padding-bottom: .2rem;} .group.list .item .r span.tag{font-size: .22rem;color: #999999;padding: .02rem .05rem;background: #f5f5f5;align-self: flex-start;} .group.list .item .r .progress{display: flex;align-items: center;height: .1rem;line-height: .1rem;margin-top: .2rem;} .group.list .item .r .progress label{font-size: .24rem;flex-shrink: 0;color: #ff3600;} .group.list .item .r .progress span{display: block;width: 100%;height: 100%;background: #f5f5f5;border-radius: .1rem;text-align: center;mar.........完整代码请登录后点击上方下载按钮下载查看
网友评论0