vue+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: url(//repo.bfw.wiki/bfwrepo/images/app/qiandao/bg.jpg) top center no-repeat #f269b5;background-size: 100% auto;} img{vertical-align: middle;max-width: 100%;} .layui-m-layerchild{width: 80%!important;} .top-bar{width: 100%;height: 1rem;line-height: 1rem;text-align: center;position: relative;font-size: .36rem;color: #fff;} .top-bar a{width: .5rem;height: 1rem;position: absolute;top: 0;left: .3rem;background: url(//repo.bfw.wiki/bfwrepo/images/app/qiandao/icon-left.png) left center no-repeat;background-size: .18rem auto;z-index: 2;} /* 签到天数 */ .sign-day{width: 100%;height: 1.32rem;background: url(//repo.bfw.wiki/bfwrepo/images/app/qiandao/sign-num.png) center center no-repeat;background-size: 4.12rem auto;margin-top: .5rem;position: relative;} .sign-day span{font-size: .48rem;color: #fb558b;font-weight: bold;position: absolute;left: 4.52rem;top: .5rem;} /* 主体 */ .container{width: 100%;padding: .3rem .5rem .5rem .5rem;position: relative;} .container .score{width: 100%;display: flex;flex-wrap: wrap;justify-content: center;align-items: center;} .container .score .item{flex-shrink: 0;width: 1.6rem;height: 1.2rem;border: .01rem solid #eeeeee;background: #f8f8f8;margin: 1rem .15rem 0 .15rem;border-radius: .15rem;text-align: center;position: relative;display: flex;flex-direction: column;align-items: center;justify-content: center;z-index: 5;} .container .score .item img{width: .64rem;height: .64rem;} .container .score .item span{font-size: .24rem;color: #333333;display:block;margin-top: .05rem;} .container .score .item i{position: absolute;font-size: .24rem;color: #777777;display: inline-block;bottom: -.16rem;left: -.16rem;width: .38rem;height: .38rem;line-height: .38rem;text-align: center;background: #eeeeee;border-radius: .05rem;} .container .score .item p{position: absolute;font-size: .24rem;color: #81620d;background: #ffdd17;padding: .03rem .15rem;border-radius: .05rem;top: -.32rem;left: .15rem;z-index: 10;display: none;} .container .score .item p::after{content: "";position: absolute;display: block;width: 0;height: 0;border-width: .1rem;border-style: solid;border-color: #ffdd17 transparent transparent transparent;left: .12rem;bottom: -.16rem;z-index: 9;} .container .score .item.on {background: #fff2f6;border: .01rem solid #ffa6c3;} .container .score .item.on p{display: block;} .container .score .item.on i{background: #fb558b;color: #fff;font-weight: bold;} .container .score .item.signed{background: #fff2f6;border: .01rem solid #ffa6c3;} .container .score .item.signed i{background: #fb558b;color: #fff;font-weight: bold;} .container .score .item:nth-child(4){order: 6;} .container .score .item:nth-child(5){order: 5;} .container .score .item:nth-child(6){order: 4;} .container .score .item:nth-child(n+4) i{right: -.050rem;left: auto;} /* 进度 */ .progress{width: 100%;z-index: 1;} .progress .line{width: 1.8rem;height: .15rem;background: #eeeeee;} .progress .line:nth-child(1){position: absolute;top: 3rem;left: .5rem;border-radius: .15rem 0 0 .15rem;z-index: 2;} .progress .line:nth-child(2){position: absolute;top: 3rem;left: 2.3rem;z-index: 2;} .progress .line:nth-child(3){position: absolute;top: 3rem;left: 4.1rem;z-index: 2;} .progress .circle-right{width: 2.3rem;height: 2.3rem;position: absolute;top: 3rem;left: 4.65rem;background: #eeeeee;border-radius: 50%;} .progress .circle-right.on{background: #65d5f9;} .progress .circle-right::after{content: "";position: absolute;display: block;width: 6.2rem;height: 1.98rem;background: #fff;right: .18rem;top:.15rem;border-radius: 0 2rem 2rem 0;} .progress .line:nth-child(5){width: 1.6rem;position: absolute;top: 5.1375rem;right: 1.55rem;z-index: 2;} .progress .line:nth-child(6){width: 1.6rem;position: absolute;top: 5.1375rem;right: 3.1rem;z-index: 2;} .progress .line:nth-child(7){width: 1.6rem;position: absolute;top: 5.1375rem;right: 4.65rem;z-index: 2;} .progress .circle-left{width:1.55rem;height: 1.55rem;position: absolute;top: 5.135rem;left: .5rem;background: #eeeeee;border-radius: 50%;} .progress .circle-left.on{background: #65d5f9;} .progress .circle-left::after{content: "";position: absolute;display: block;width: 6rem;height: 1.25rem;background: #fff;left: .18rem;top:.14rem;border-radius: 2rem;} .progress .circle-left span{position: absolute;display: block;z-index: 3;width: 1.11rem;height: 1.14rem;background: url(//repo.bfw.wiki/bfwrepo/images/app/qiandao/icon-qz.png) center center no-repeat;background-size: 1.11rem auto;bottom: .08rem;right: -1.4rem;} .progress .line:nth-child(9){width: 1.2rem;position: absolute;top: 6.535rem;left: 1.3rem;border-radius: 0 .15rem .15rem 0;z-index: 2;} .progress .line.on{background: #65d5f9;} .progress .line.this span{display: block;position: absolute;width: .24rem;height: .36rem;background: url(//repo.bfw.wiki/bfwrepo/images/app/qiandao/icon-begin.png) top center no-repeat;background-size: .23rem auto;left: 50%;top: -.3rem;} /* 礼包 */ .libao{position: absolute;z-index: 3;width: 2.08rem;height: 1.99rem;background: url(//repo.bfw.wiki/bfwrepo/images/app/qiandao/icon-lb.png) center center no-repeat;background-size: 2.08rem auto;top: 5.5rem;left: 3.5rem;} /* 按钮 */ .button{width: 3rem;height: 1.04rem;background: url(//repo.bfw.wiki/bfwrepo/images/app/qiandao/btn.png) center center no-repeat;background-size: 3rem auto;position: absolute;top: 7.8rem;left: 50%;transform: translateX(-50%);cursor: pointer;} /* 活动规则 */ .rule{width: 100%;padding: 3.8rem .25rem .45rem .25rem;color: #fff;} .rule h4{font-size: .32rem;padding-bottom: .15rem;} .rule p{font-size: .28rem;line-height: .35rem;} /* 领奖弹窗 */ .lingqu-dialog{position:fixed;top: 0;left: 0;width: 100%;height: 100vh;background: rgba(0,0,0,.8);z-index: 9999;} .lingqu-dialog .dialog-body{width: 100%;height: 100%;display: flex;flex-direction: column;justify-content: center;align-items: center;} .lingqu-dialog .dialog-body img{width: 4rem;margin-bottom: 1rem;} .lingqu-dialog .dialog-body button{width: 3rem;height: 1.04rem;background: url(//repo.bfw.wiki/bfwrepo/images/app/qiandao/btn-lq.png) center center no-repeat;background-size: 3rem auto;cursor: pointer;} </style> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/flexible.js"></script> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/vue@2.6.1.js"></script> <script type="text/javascript" src="//repo.bfw.wiki/bfwrep.........完整代码请登录后点击上方下载按钮下载查看
网友评论0