css实现移动端手机端带tab选项卡切换的商城抢购商品页面效果代码
代码语言:html
所属分类:选项卡
代码描述:css实现移动端手机端带tab选项卡切换的商城抢购商品页面效果代码
代码标签: 端 手机 端带 tab 选项 卡 切换 的 商城 抢购 商品 页面 效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<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 {
width: 100%;
height: auto;
display: block;
border: 0;
}
body {
background: #edecec;
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%;
}
.arrow {
position: relative;
padding-right: 0.8rem;
}
.arrow span {
font-size: 0.8rem;
color: #9b9b9b;
}
.arrow:after {
content: " ";
display: inline-block;
height: 6px;
width: 6px;
border-width: 2px 2px 0 0;
border-color: #848484;
border-style: solid;
-webkit-transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
position: relative;
top: -2px;
position: absolute;
top: 50%;
margin-top: -4px;
right: 2px;
border-radius: 1px;
}
.flex {
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
padding: 15px;
position: relative;
}
.flex-box {
-webkit-box-flex: 1;
-webkit-flex: 1;
flex: 1;
min-width: 0;
font-size: 14px;
color: #333;
}
/* 必要布局样式css */
.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;
}
.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;
padding-bottom: 55px;
}
.navBar {
height: 44px;
position: relative;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
z-index: 102;
background: none;
}
.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;
}
.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;
}
.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;
}
.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%;
}
.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/NlyAAABuUlEQVRoQ+3a61HDMBAE4NsO6ARSAdAJdAAdQAfQQVIBdABUQOiEDo65GYeJHUcPW0p8a/tnHtZ9OdkebQSZ2YGZeWUBs3d86XDNDqvqBYDfmmPEzn2SDhtURN5E5KYp6BHAS6y4Gu9XBzfYDxG56gBWALY1UKFzVgUHsFbTM4AnGnAEa06eDidgXwE8nLq7Nl7xKZ2A3QC4Owe2OHjq2KJgD9hiYC/YImBP2NFgb9hRYI/YwWCv2EFgz9hssHdsFpgBmwxmwSaBmbBRMBs2CGbEHgWzYnvBCVj73ue51rMZ476LiK29WynpQQCgqt89gVvGOJP66BbAar+iFlhVLUa1hJHpuAXwPyPnDba2qqplxZckLf4B0MrD+65h+5fApkAI/eXgB7Gb1jp602q6HEPbie4doA9KPBrTNo+nUKddooO5NCM6GsSzoaNgtms6CcyETgazoLPADOhssHf0ILBn9GCwV/QosEf0aLA3dBGwJ3QxsBd0UbAHdHFwIppn29JuxZ2wyuLZmJaI5tp6mIDm63AHbaHadfMa7/bh/RRtNhvEp5RuVnksTQnYrWUBT7k7JWqbXYf/AIUt/D3HtjywAAAAAElFTkSuQmCC');
}
.icon-more {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAADlklEQVRoQ+2Y4VXVQBCF51agVKBUIFQgVKBUIFYgVKBWIFagVCBWIFQgVCBUIFYwng83nM1mNnnk+Cdh94/H97KTmXvv3JmH7JEdPbJ6rRW8dsYbw43hlSHQJL0yQgflNIYbwytDoEl6ZYQ202qSbpJeGQJN0isjtLn0QNLu/tzM3pnZnpntJIhuzezczM4knc5RgbsT642ZvTYz3sG5TnFPJRH/wcfdybOL+zQFuExxP0viHfenV7C7U+gHM+suRgkQ7K0k/p087k6s92Z2NPEwBR9IAtzJk+J+S8SMPX8i6bh74L5gd/9iZoeTb/r3AEntTxWdkvqRKWUqPCASd7TopMKfE8Tk70KZB3xwV7C7g/6nqWyK75HK7lhy7n6S2uMhoc8l7Y9dcHeK7dpt09jI+0iJhV8BWn/MrJMtsnwRRP4oiRYYnNRbsFuem9S7fE4vPwueQdpnlbioEDWW5yopj88B40nwzDYFR+xeYC45e+6O2dAz+bmVtFVJ7Gsyk/xrDO+oiAtg9Hh+vkvifRGQEbvHklDT3Ukk8n/MLD+fKRgkXxVfbJfulgJFRdBzA4d199+Fam4kde7ce527o6SegiTVJghqnAQnFU3b5UxfUDDJvswijCUWySmUn7t7kdiFJEZIxFrU6wPQK20y1lZlbUbBJbrXkrYriUWyZkTBfMlaWfCYTCNZY4i90fe/Ch6gYGZbkftWXLcm6bLgS0m7FSCHTMSSxozo4X5fSuGMd3fkn7fRFQxH6PaGdepfLkazrwZO5A0DNVRYu5IUjh13py9LZ4/UEJnxKQVTSGkE1AjqnRkxlujfcgNjJQyXFXevjY88Lu+O7vdcN6ezQhCP0FbdGolXRH6x3y0ecxYE5vRO5OZdgoEhRoouP6uaZlIaoJfuu0ncO9PsCiYIyEfLRS1YaFYFGzCI8URLQBQXEPc2WFmjXh4rmqWEuLf5Lk3RyKKcyWUgkjqsbUKBW1M0/TwFJhsYy86mP0ooGpKmwLwvltyi4c7ooeHz2cyzFErivU1pEy0lKdKrxC0Lp1CAxig3+qWUtQwkEZPYpZFRKDF7I3P0TzzJQYnPCrkR8lMApA2oc2Bmfu/36tT92vfJfLsRxAgMwWt/05qL8FLuNYaXwtTcPBvDc5Fbyr3G8FKYmptnY3gucku51xheClNz82wMz0VuKfcaw0tham6ejeG5yC3lXmN4KUzNzbMxPBe5pdz7C/zNdlJybo77AAAAAElFTkSuQmCC');
}
.m-slider {
overflow-x: hidden;
width: 100%;
position: relative;
}
.slider-wrapper {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
width: 100%;
height: 100%;
-webkit-transform: translate3d(0px, 0px, 0px);
transform: translate3d(0px, 0px, 0px);
position: relative;
z-index: 1;
-webkit-transition-property: -webkit-transform;
transition-property: -webkit-transform;
transition-property: transform;
transition-property: transform, -webkit-transform;
}
.slider-item {
width: 100%;
height: 100%;
-webkit-flex-shrink: 0;
-ms-flex-negative: 0;
flex-shrink: 0;
background: #f6f6f6;
}
.slider-item img {
width: 100%;
height: auto;
display: block;
border: none;
}
.slider-pagination {
text-align: right;
position: absolute;
width: 100%;
z-index: 2;
right: 0;
bottom: 10px;
pointer-events: none;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-align: end;
-webkit-align-items: flex-end;
-ms-flex-align: end;
align-items: flex-end;
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
}
.slider-pagination > .slider-pagination-item {
margin: 0 .25rem;
width: 8px;
height: 8px;
display: inline-block;
border-radius: 100%;
background-color: rgba(255,255,255,0.4);
}
.slider-pagination > .slider-pagination-item.slider-pagination-item-active {
background-color: #fff;
border-radius: 100%;
}
.palace {
padding: 0.5rem 0;
position: relative;
overflow: hidden;
}
.palace-grid {
position: relative;
float: left;
padding: 1px;
width: 20%;
box-sizing: border-box;
margin: 5px 0;
}
.palace-grid-icon {
width: 30px;
height: 30px;
margin: 0 auto;
}
.palace-grid-icon img {
display: block;
width: 100%;
height: 100%;
border: none;
}
.palace-grid-text {
display: block;
text-align: center;
color: #333;
font-size: 0.85rem;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
padding-top: 0.2rem;
}
.palace-grid-text h2 {
font-size: 0.8rem;
font-weight: normal;
color: #666666;
}
.m-actionsheet {
text-align: center;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
z-index: 1000;
background-color: #EFEFF4;
-webkit-transform: translate(0, 100%);
transform: translate(0, 100%);
-webkit-transition: -webkit-transform .3s;
transition: -webkit-transform .3s;
transition: transform .3s;
transition: transform .3s, -webkit-transform .3s;
}
.mask-black {
background-color: rgba(0, 0, 0, 0.4);
position: fixed;
z-index: 500;
bottom: 0;
right: 0;
left: 0;
top: 0;
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;
z-index: 998;
}
.actionsheet-action {
display: block;
margin-top: .15rem;
font-size: 0.28rem;
color: #555;
height: 1rem;
line-height: 1rem;
background-color: #FFF;
}
.m-actionsheet {
text-align: center;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
z-index: 10005;
background-color: #ffffff;
-webkit-transform: translate(0, 100%);
transform: translate(0, 100%);
-webkit-transition: -webkit-transform .3s;
transition: -webkit-transform .3s;
transition: transform .3s;
transition: transform .3s, -webkit-transform .3s;
}
.actionsheet-toggle {
-webkit-transform: translate(0, 0);
transform: translate(0, 0);
}
.actionsheet-item {
display: block;
position: relative;
font-size: 0.85rem;
color: #555;
height: 2rem;
line-height: 2rem;
background-color: #FFF;
}
.actionsheet-item {
display: block;
position: relative;
font-size: 0.85rem;
color: #555;
height: 2rem;
line-height: 2rem;
background-color: #FFF;
}
.coll-cancel a {
height: 45px;
line-height: 45px;
font-size: 12px;
background: #f9f9f9;
display: block;
text-align: center;
width: 100%;
}
.coll-share-img {
width: 38px;
height: 38px;
margin: 0 auto;
}
.coll-share-img img {
width: 100%;
height: auto;
display: block;
border: none;
}
.coll-share-box {
position: relative;
overflow: hidden;
padding: 10px 0;
}
.coll-cancel a {
height: 45px;
line-height: 45px;
font-size: 12px;
background: #f9f9f9;
display: block;
text-align: center;
width: 100%;
}
.coll-share-item {
position: relative;
float: left;
padding: 8px 10px;
width: 33.333%;
box-sizing: border-box;
font-size: 12px;
height: 85px;
}
.rule {
position: absolute;
right: 0;
top: 1rem;
background: #54ca9a;
border-radius: 50px 0 0 50px;
font-size: 0.8rem;
padding: 0.2rem 0.6rem;
color: #fff;
}
.head-chang {
width: 100%;
height: 13rem;
background-image: url("//repo.bfw.wiki/bfwrepo/image/60cc67a8d1821.png");
background-repeat: no-repeat;
background-size: 100%;
background-position: top center;
}
.center-title img {
width: 70px;
margin: 0 auto;
}
.tab-nav {
height: 55px;
display: block;
position: relative;
z-index: 1;
width: 100%;
margin: 0 auto 0.1rem;
}
.tab-nav-item {
height: 55px;
position: relative;
text-align: center;
color: #585858;
font-size: 0.9rem;
display: block;
float: left;
width: 20%;
}
.tab-nav-item.tab-active {
/* background-color: #51bd03; */
}
.tab-nav-item.tab-active a {
color: rgba(255,255,255,1);
font-size: 0.9rem;
}
.tab-nav-item a {
display: inherit;
font-size: 0.9rem;
color: rgba(255,255,255,0.7);
}
.tab-nav-item a h2 {
font-size: 0.9rem;
}
.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: 20%;
height: 4px;
position: absolute;
left: 50%;
bottom: 5px;
margin-left: -10%;
z-index: 4;
border-radius: 10px;
background-color: #fff;
}
.palace-one {
background: #fff;
margin: 0 1rem;
border-radius: 5px;
}
.palace-one .palace-grid {
width: 25%;
}
.palace-one .palace-grid-icon {
width: 75px;
height: 75px;
}
.palace-one .palace-grid-text h2 {
font-size: 1rem;
color: #dd2f2e;
font-weight: bold;
}
.palace-one .palace-grid-text h2 i {
font-weight: normal;
font-style: normal;
font-size: 0.85rem;
}
.flex-for {
background: #fff;
border-radius: 5px;
width: 92%;
margin: 0.8rem auto;
}
.img-fov {
width: 100px;
height: 100px;
margin-right: 0.5rem;
position: relative;
}
.img-fov span {
width: 55px;
position: absolute;
left: -1.1rem;
top: -7px;
}
.sep-box {
width: 65%;
position: relative;
height: 0.8rem;
border-radius: 33px;
overflow: hidden;
background: #fee0de;
float: left;
}
.sep-content {
overflow: hidden;
margin-bottom: 0.4rem;
}
.sep-line {
width: 100%;
height: 0.8rem;
position: absolute;
top: 0;
left: 0;
border-radius: 33px;
overflow: hidden;
background: #fe2053;
}
.nub-text {
float: right;
color: #f0193b;
line-height: 1;
font-size: 0.75rem;
}
.button-got {
border: 1px solid #fe2053;
color: #fe2053;
background: none;
border-radius: 22px;
position: absolute;
bottom: 1rem;
right: 1rem;
padding: 0.2rem 0.5rem;
}
.flex-box span {
background: #ffe9eb;
color: #ff2146;
font-size: 0.65rem;
border-radius: 22px;
padding: 0.02rem 0.6rem;
}
.flex-box h4 {
word-wrap: normal;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
text-align: justify;
font-weight: normal;
color: #212121;
margin-bottom: 0.4rem;
}
.flex-box h5 {
word-wrap: normal;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
text-align: justify;
font-weight: normal;
color: #9a9a9a;
margin-top: 0.8rem;
text-decoration: line-through;
}
.flex-box h6 {
color: #ed0127;
font-size: 0.9rem;
}
.flex-box h6 i {
font-weight: normal;
font-style: normal;
font-size: 0.7rem;
}
.for-box {
background-image: url("../images/for.png");
background-size: 100%;
background-repeat: no-repeat;
width: 92%;
margin: 0 auto;
border-radius: 5px;
padding: 0 0 1rem 1rem;
background-color: #fed4d5;
}
.for-box .flex {
padding-bottom: 5px;
}
.list-theme-box {
margin-top: 0.5rem;
overflow: hidden;
position: relative;
}
.list-item {
width: 29.666%;
float: left;
margin: 0 3% 0 0;
display: block;
overflow: hidden;
}
.list-theme-box .list-item:nth-child(3) {
margin-right: 0;
}
.list-theme-img {
height: auto;
width: 100%;
position: relative;
}
.list-theme-img img {
border-radius: 10px;
}
.arrow {
position: relative;
padding-right: 0.8rem;
}
.arrow span {
font-size: 0.8rem;
color: #ed0127;
}
.flex-box h2 {
color: #ed0127;
font-size: 1rem;
}
.arrow:after {
content: " ";
display: inline-block;
height: 6px;
width: 6px;
border-width: 2px 2px 0 0;
border-color: #ed0127;
border-style: solid;
-webkit-transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
position: relative;
top: -2px;
position: .........完整代码请登录后点击上方下载按钮下载查看
















网友评论0