css布局实现手机端移动端我的优惠券tab选项卡页面效果代码
代码语言:html
所属分类:布局界面
代码描述:css布局实现手机端移动端我的优惠券tab选项卡页面效果代码
代码标签: 手机 端 移动 端 我的 优惠券 tab 选项 卡 页面 效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>手机app通用模板我的优惠券页面模板</title> <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"/> <meta content="yes" name="apple-mobile-web-app-capable"/> <meta content="black" name="apple-mobile-web-app-status-bar-style"/> <meta content="telephone=no" name="format-detection"/> <style> html,body { color: #333; margin: 0; height: 100%; font-family: "Myriad Set Pro","Helvetica Neue",Helvetica,Arial,Verdana,sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-weight: normal; } * { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } a { text-decoration: none; color: #000; } a, label, button, input, select { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } img { border: 0; } body { background: #f6f6f6; color: #666; } html, body, div, dl, dt, dd, ol, ul, li, h1, h2, h3, h4, h5, h6, p, blockquote, pre, button, fieldset, form, input, legend, textarea, th, td { margin: 0; padding: 0; } a { text-decoration: none; color: #08acee; } button { outline: 0; } img { border: 0; } button,input,optgroup,select,textarea { margin: 0; font: inherit; color: inherit; outline: none; } li { list-style: none; } a { color: #666; } .clearfix::after { clear: both; content: "."; display: block; height: 0; visibility: hidden; } .clearfix { } .divHeight { width: 100%; height: 10px; background: #f5f5f5; position: relative; overflow: hidden; } .r-line { position: relative; } .r-line:after { content: ''; position: absolute; z-index: 0; top: 0; right: 0; height: 100%; border-right: 1px solid #D9D9D9; -webkit-transform: scaleX(0.5); transform: scaleX(0.5); -webkit-transform-origin: 100% 0; transform-origin: 100% 0; } .b-line { position: relative; } .b-line:after { content: ''; position: absolute; z-index: 2; bottom: 0; left: 0; width: 100%; height: 1px; border-bottom: 1px solid #e2e2e2; -webkit-transform: scaleY(0.5); transform: scaleY(0.5); -webkit-transform-origin: 0 100%; transform-origin: 0 100%; } .aui-flex { display: -webkit-box; display: -webkit-flex; display: flex; -webkit-box-align: center; -webkit-align-items: center; align-items: center; padding: 15px; position: relative; } .aui-flex-box { -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; min-width: 0; font-size: 14px; color: #333; } /* 必要布局样式css */ .aui-flexView { width: 100%; height: 100%; margin: 0 auto; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; } .aui-scrollView { width: 100%; height: 100%; -webkit-box-flex: 1; -webkit-flex: 1; -ms-flex: 1; flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; position: relative; } .aui-navBar { height: 44px; position: relative; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; z-index: 1002; background: #fefefe; } .aui-navBar-item { height: 44px; min-width: 25%; -webkit-box-flex: 0; -webkit-flex: 0 0 25%; -ms-flex: 0 0 25%; flex: 0 0 25%; padding: 0 0.9rem; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; font-size: 0.7rem; white-space: nowrap; overflow: hidden; color: #808080; position: relative; } .aui-navBar-item:first-child { -webkit-box-ordinal-group: 2; -webkit-order: 1; -ms-flex-order: 1; order: 1; margin-right: -25%; font-size: 0.9rem; font-weight: bold; } .aui-navBar-item:last-child { -webkit-box-ordinal-group: 4; -webkit-order: 3; -ms-flex-order: 3; order: 3; -webkit-box-pack: end; -webkit-justify-content: flex-end; -ms-flex-pack: end; justify-content: flex-end; } .aui-center { -webkit-box-ordinal-group: 3; -webkit-order: 2; -ms-flex-order: 2; order: 2; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; height: 44px; width: 50%; margin-left: 25%; } .aui-center-title { text-align: center; width: 100%; white-space: nowrap; overflow: hidden; display: block; text-overflow: ellipsis; font-size: 0.95rem; color: #333; } .icon { width: 20px; height: 20px; display: block; border: none; float: left; background-size: 20px; background-repeat: no-repeat; } .icon-return{ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAACh0lEQVRoQ+3ZMW8TMRQH8PcOsTBQISExVCIRCwgWFvZ+hZYBpIrEcTYkBsTGlI2VDamL3YEBpWJoR1BJaOlXYEzyDYp0bMRGRjnJoDuWs/1e3EbKeHf55b33vzsb4YJ98IJ54RKce8XZV1gIcQ8AviDiD2vtC631pzZFYQ2WUt611p4CwM0VcqqU2soSXIN1ztdKqTfZgRuw75RSz9tg3bHsWjomlh04NpYVOAWWDbjf7z8oimLipbH7bUopJdvO7L/Hk8+wwyLiCSLe8H6cww4BwGYFTo0lbWkKLBmYCksCrsNaa99rrZ/FmFnS0GrCdrvd3mg0MqEDqu58yVKaAzZZSwshHgLAsX/rcW2csrJVtaNXeIWdIuL16qJU2OgVrsMCwEGn03mSamaThVYTtizLp+PxeJkioJKFFldslJbmjA0O5o4NCm7AHpZluUM5s1FCSwjxCAA++7ceADiczWaPJ5PJL6qAihJaUspdY8w+Il7xLsASG6SlhRA/EfGa91BxNJ/Pd7hVNtiT1mAwOAeADXdCa637Hi0Wi3zBUsptY8wHRLzqwIh/nlbzbWmna0roLEOrmo11QQd9W1oHdFDwOrR3cLCH/uuFn0uQRQE7dMPKJHl6RwNzRUcF/w9N9VIRHVyhazbLDihWP5KAHbphOzQ5OhmYCzopmAM6OZgaTQL20FMAuOUtHESfaTLwCn3HWnuWEk0KpkCTg1OjWYArtDHmKyJu+jMdeh+KDdghh8NhZ7lcfvPRoXcaWYFToNmBY6NZgj20m+nb3pr3W631yzY7GWzBDtXr9TaLojjz0N+VUvezBXvoPQBw0Fda649Zg9vg6o5l3dKhse58l+AY/yqnc/4GvNDoTFOq8FwAAAAASUVORK5CYII="); } .tab-nav { height: 40px; line-height: 40px; display: block; position: relative; background: #fff; z-index: 1; width: 100%; margin: 0 auto; } .tab-nav-item { height: 40px; line-height: 40px; position: relative; text-align: center; color: #585858; font-size: 0.9rem; display: block; float: left; width: 33.333%; } .tab-nav-item.tab-active { /* background-color: #51bd03; */ } .tab-nav-item.tab-active a { color: #ff1767; font-size: 0.85rem; } .tab-nav-item a { display: inherit; font-size: 0.85rem; color: #313038; font-weight:bold; } .tab-panel { position: relative; overflow: hidden; } .tab-panel .tab-panel-item { width: 100%; position: absolute; top: 0; -webkit-transform: translateX(-100%); transform: translateX(-100%); } .tab-panel .tab-panel-item.tab-active ~ .tab-panel-item { -webkit-transform: translateX(100%); transform: translateX(100%); } .tab-panel .tab-panel-item.tab-active { position: relative; -webkit-transition: -webkit-transform .15s; transition: -webkit-transform .15s; transition: transform .15s; transition: transform .15s, -webkit-transform .15s; -webkit-transform: translateX(0); transform: translateX(0); } .tab-nav-item.tab-active:before { content: ''; width: 40%; height: 2px; position: absolute; left: 50%; bottom: 0; margin-left: -20%; z-index: 4; background-image: -webkit-gradient(linear,left top,right top,from(#ff6143),to(#ff1767)); background-image: -webkit-linear-gradient(left,#ff6143,#ff1767); background-image: -moz-linear-gradient(left,#ff6143,#ff1767); background-image: linear-gradient(to right,#ff6143,#ff1767); background-color: #ff6143; border-radius:5px 5px 0 0; } .aui-flex-box input{ background:#f6f6f6; padding:0.5rem 0.5rem; width:100%; border:none; border-radius:3px; } .aui-button-btn button{ background-image: -webkit-gradient(linear,left top,right top,from(#ef0f82),to(#fe1c44)); background-image: -webkit-linear-gradient(left,#ef0f82,#fe1c44); background-image: -moz-linear-gradient(left,#ef0f82,#fe1c44); background-image: linear-gradient(to right,#ef0f82,#fe1c44); background-color: #ef0f82; border-radius:3px; font-size:0.845rem; padding:0.38rem 1rem; border:none; margin-left:0.5rem; color:#fff; } .aui-flex-search{ background:#fff; } .aui-price-nub{ background-image: -webkit-gradient(linear,left top,right top,from(#f63f5d),to(#ec2546)); background-image: -webkit-linear-gradient(left,#f63f5d,#ec2546); background-image: -moz-linear-gradient(left,#f63f5d,#ec2546); background-image: linear-gradient(to right,#f63f5d,#ec2546); background-color: #ec2546; height:7rem; border-radius:3px 0 0 3px; overflow:hidden; } .tab-panel-item .aui-flex{ height:7rem; background:#fff; margin:1rem 1rem 0 1rem; border-radius:3px; border:1px solid #efefef; padding:0; -webkit-box-align: initial; -webkit-align-items: initial; align-items: initial; position:relative; } .tab-panel-item .aui-flex:before{ content: ''; position: absolute; z-index: 0; top: 73.999%; left: -10px; width: 18px; height: 18px; border-radius: 100%; background: #f6f6f6; margin-top: -10px; } .tab-panel-item .aui-flex:after { content: ''; position: absolute; z-index: 0; top: 73.999%; right: -10px; width: 18px; height: 18px; border-radius: 100%; background: #f6f6f6; margin-top: -10px; } .aui-digit{ height:5rem; padding:0 1.2rem; } .aui-full{ height:2rem; line-height:2.3rem; background:#d01c39; color:#f3c1ca; font-size:0.8rem; text-align:center; } .aui-digit h2{ color:#fefefe; font-size:2.8rem; line-height:5rem; } .aui-digit h2 em{ font-style:normal; font-size:1rem; font-weight:normal; } .tab-panel-item .aui-flex .aui-flex-box{ height:5.05rem; border-bottom:1px dashed #eaeaea; padding-left:1rem; padding-top:1rem; position:relative; } .tab-panel-item .aui-flex .aui-flex-box button{ background-image: -webkit-gradient(linear,left top,right top,from(#ef0f82),to(#fe1c44)); background-image: -webkit-linear-gradient(left,#ef0f82,#fe1c44); background-image: -moz-linear-gradient(left,#ef0f82,#fe1c44); background-image: linear-gradient(to right,#ef0f82,#fe1c44); background-color: #ef0f82; color:#fff; border-radius:50px; border:none; font-size:0.7rem; padding:0.15rem 0.5rem; position:absolute; right:15px; bottom:10px; } .aui-flex-box h2{ font-size:0.9rem; margin-bottom:0.8rem; } .aui-flex-box h3{ font-weight:normal; font-size:0.8rem; color:#8a8a8c; } .tab-panel-item-clear .aui-price-nub{ background-color:#eaeaea; background-image: -webkit-gradient(linear,left top,right top,from(#eaeaea),to(#f5f5f5)); background-image: -webkit-linear-gradient(left,#eaeaea,#f5f5f5); background-image: -moz-linear-gradient(left,#eaeaea,#f5f5f5); background-image: linear-gradient(to right,#eaeaea,#f5f5f5); } .tab-panel-item-clear .aui-full{ background-color:#d8d8d8; background-image: -webkit-gradient(linear,left top,right top,from(#d8d8d8),to(#f5f5f5)); background-image: -webkit-linear-gradient(left,#d8d8d8,#f5f5f5); background-image: -moz-linear-gradient(left,#d8d8d8,#f5f5f5); background-image: linear-gradient(to right,#d8d8d8,#f5f5f5); color:#999; } .tab-panel-item-clear .aui-flex .aui-flex-box button{ background-color:#d8d8d8; background-image: -webkit-gradient(linear,left top,right top,from(#d8d8d8),to(#f5f5f5)); background-image: -webkit-linear-gradient(left,#d8d8d8,#f5f5f5); background-image: -moz-linear-gradient(left,#d8d8d8,#f5f5f5); background-image: linear-gradient(to right,#d8d8d8,#f5f5f5); } </style> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/jquery-3.2.1.min.js"></script> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/tab.js"></script> </head> <body> <section class="aui-flexView"> <header class="aui-navBar aui-navBar-fixed b-line"> <a href="javascript:;" class="aui-navBar-item"> <i class="icon icon-return"></i> </a> <div class="aui-center"> <span class="aui-center-title">我的优惠券</span> </div> <a href="javascript:;" class="aui-navBar-item"> <i class="icon icon-sys"></i> </a> </header> <section class="aui-scrollView"> <div class="aui-tab" data-ydui-tab> <ul class="tab-nav b-line"> <li class="tab-nav-item tab-active"> <a href="javascript:;"> <span>未使用</span> </a> </li> <li class="tab-nav-item"> <a href="javascript:;"> <span>已使用</span> </a> </li> <li class="tab-nav-item"> <a href="javascript:;"> <span>已过期</span> </a> </li> </ul> <div class="aui-flex aui-flex-search b-line"> <div class="aui-flex-box"> <input type="text" placeholder="请输入兑换码"> </div> <div class="aui-button-btn"> <button>兑换</button> </div> </div> <div class="tab-panel"> <div class="tab-panel-item tab-active"> <a href="javascript:;" class="aui-flex"> <div class="aui-price-nub"> <div class=".........完整代码请登录后点击上方下载按钮下载查看
网友评论0