css布局实现移动端手机端领优惠券活动h5页面效果代码
代码语言:html
所属分类:布局界面
代码描述:css布局实现移动端手机端领优惠券活动h5页面效果代码
代码标签: 移动 端 手机 端领 优惠券 活动 h5 页面 效果
下面为部分代码预览,完整代码请点击下载或在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: #de1829;
color: #ffffff;
}
img {
vertical-align: middle;
max-width: 100%;
}
.container {
width: 100%;
padding: 0 .4rem;
}
/*顶部*/
.top-bar {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: .8rem;
position: relative;
background: #ffffff;
}
.top-bar i {
display: inline-block;
width: .5rem;
height: .8rem;
background: url(//repo.bfw.wiki/bfwrepo/image/60b95f5dd4bec.png) left center no-repeat;
background-size: .17rem .30rem;
position: absolute;
left: .2rem;
}
.top-bar span {
font-size: .32rem;
color: #000000;
}
/* 顶部大图 */
.banner {
width: 100%;
height: auto;
overflow: hidden;
position: relative;
}
.banner img {
width: 100%;
}
.banner a {
position: absolute;
right: 0;
top: .26rem;
font-size: .24rem;
color: #5c2405;
display: inline-block;
padding: .12rem .15rem .12rem .2rem;
background: linear-gradient(to right bottom,#eb8657,#f7d481);
border-radius: .55rem 0 0 .55rem;
border: .05rem solid #ffffff;
border-right: none;
}
.banner a i {
font-style: italic;
}
/* 礼包月份 */
.month-cate {
width: 100%;
}
.month-cate ul {
width: 100%;;display: flex;
justify-content: space-between;
align-items: center;
height: .72rem;
background: #c60000;
box-shadow: 0 .25rem .25rem rgba(120,0,0,.3);
}
.month-cate ul li {
font-size: .3rem;
color: #fce0b3;
width: 100%;
text-align: center;
position: relative;
height: 100%;
line-height: .72rem;
}
.month-cate ul li.active {
background: #de1829;
border-radius: 0 .3rem 0 0;
box-shadow: 0 .0 .25rem rgba(120,0,0,.3);
}
.month-cate ul li:nth-child(2) {
border-radius: .3rem .3rem 0 0;
}
.month-cate ul li:nth-child(3) {
border-radius: .3rem .3rem 0 0;
}
.month-cate ul li:nth-child(4) {
border-radius: .3rem 0 0 0;
}
/*领取规则*/
.rule-dialog {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100vh;
overflow: hidden;
z-index: 9;
display: none;
}
.rule-dialog .mask {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100vh;
background: rgba(0,0,0,.3);
}
.rule-dialog .content {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
width: 80%;
height: auto;
background: #FFFFFF;
border-radius: .35rem;
padding: .25rem;
}
.rule-dialog .content h2 {
display: flex;
justify-content: space-between;
align-items: flex-start;
font-size: .32rem;
padding-bottom: .3rem;
color: #000;
}
.rule-dialog .content i {
margin-right: .1rem;
}
.rule-dialog .content .desc {
font-size: .24rem;
color: #333;
height: 5rem;
overflow-y: auto;
}
/* 礼包内容 */
.month-detail {
width: 100%;
padding: .25rem .3rem .85rem .3rem;
display: none;
}
.month-detail.active {
display: block;
}
.month-detail .coupon {
width: 100%;
height: auto;
background: #c60000;
border-radius: .25rem;
padding: .3rem .15rem .2rem .15rem;
margin-bottom: .2rem;
}
.month-detail .coupon ul {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.month-detail .coupon.one ul li {
width: 3.21rem;
height: 3.12rem;
background: url(//repo.bfw.wiki/bfwrepo/image/60c957ae03c8b.png) center center no-repeat;
background-size: 100% 100%;
margin-bottom: .2rem;
position: relative;
text-align: center;
white-space: nowrap;
}
.month-detail .coupon.one ul li .title {
display: inline-block;
font-size: .26rem;
color: #fffef8;
background: linear-gradient(to right,#fb6e4c,#f85450,#f12158);
position: absolute;
top: .02rem;
left: 50%;
transform: translateX(-50%);
padding: .03rem .25rem .06rem .25rem;
border-radius: 0 0 .15rem .15rem;
}
.month-detail .coupon.one ul li .title.yellow {
background: #ffe2b8;
padding: .03rem .15rem .06rem .15rem;
color: #c60000;
}
.month-detail .coupon.one ul li .money {
font-size: .78rem;
color: #fd1011;
padding-top: ..........完整代码请登录后点击上方下载按钮下载查看
















网友评论0