css布局实现手机单移动端h5电子商城首页效果代码
代码语言:html
所属分类:布局界面
代码描述:css布局实现手机单移动端h5电子商城首页效果代码
代码标签: 手机 单移动 ( 单 移动 ) 端 h5 电子商城 首页 效果
下面为部分代码预览,完整代码请点击下载或在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: #fff;
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%;
}
.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;
}
.navBar {
height: 44px;
position: relative;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
z-index: 102;
background: #ffffff;
}
.navBar-item {
height: 44px;
min-width: 23%;
-webkit-box-flex: 0;
-webkit-flex: 0 0 23%;
-ms-flex: 0 0 23%;
flex: 0 0 23%;
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: 82%;
margin-left: 15%;
}
.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;
background-image: url(//repo.bfw.wiki/bfwrepo/image/60b03da6419f8.png);
}
.icon-return {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAACfElEQVRoQ+2ajzHFQBDGv1cBKkAHVIAOqAAVoAJ0oANUQAeoABWgAjpgvpncm3ubvfyTXO6SvRljntyL/e1+e7nd3AIzG4uZ8cKApx7xUIS3AGxmDv8F4FMyaMAnAG4zh3XmnwK481k04G8A6xMB/gGwUQW8A+B1IrAOYxfAm/sgI7wP4MkDfgFwlZkDaO+eZ/MBgOemwEcAHjMDPgTw0BV4xTuZgEuVtoqwAWcQZYtwm0XLJG2STs8DlsOWw54qK+WQnnpVi0zSQ0mannWb9nut+C7iwdLzuChBWb5xLn9rg3PPigssZJZFQIXaokRYbtgJwLKs1HEoqjEa5QYh+LyXg7AfojYvFfTK96IA02i/JKMdFwBuFIN+lb+xSJdR1jovjLLvLC3QowFfB2rpSQCz6L4U7t4OSFqq4R0AOy1ysJFISfsj5ER/TpQI8x+eA2AuU5qUcmiBYW5SrpzLOZwbWrRoPO/L77ARoaWIdFQ04IqFM+olAx7qORw1jGM/h1OBpR0maZO0p0erlhpu2C2HR/SALVq2aFUsWrN7mdZ0w846tW7EOkbhihhnT6uXaXUQ7nrdaSCWf3zvPMbJgkpgAmgFeh14FfCYsLR7xTbNUK2Y7wo8NmypzRSKDA1lzmmdCLdB93tY2n00WHY3Ypwo4JkONhCXZzua5l4oslIFEjgEy01BqLtRp6JertctNl2Ak4UtJXQLF4YinDRs38DJw/YJzLcM8jnLBWr0nJWq7SuHuRD5m4okYfuMsO/IZGGHAE4atm/g5GH7BM4C9j/A3HZy27YGIBvY/wDzu4TmT5O38i32NMNO7fpYGtaqAe9uwAM6N4lbzy7Cf5cA5z0j3dy/AAAAAElFTkSuQmCC');
}
.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: 10px;
height: 3px;
display: inline-block;
border-radius: 2px;
background-color: rgba(255,255,255,0.4);
}
.slider-pagination > .slider-pagination-item.slider-pagination-item-active {
background-color: #fff;
border-radius: 2px;
}
.palace {
padding: 0.5rem 0;
position: relative;
overflow: hidden;
background-color: #fff;
}
.ad-box {
background-color: #ebfffd;
}
.ad-box-img {
padding: 0.2rem 0 0.8rem 0;
}
.palace-grid {
position: relative;
float: left;
padding: 1px;
width: 20%;
box-sizing: border-box;
margin: 5px 0;
}
.palace-grid-icon {
width: 40px;
height: 40px;
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.7rem;
font-weight: normal;
color: #313534;
}
.search-box {
background: #ebeaea;
border-radius: 3px;
position: relative;
width: 100%;
height: 31px;
}
.search-box input {
width: 100%;
background: none;
border: none;
font-size: 0.85rem;
text-align: left;
height: 31px;
border-radius: 22px;
padding: 0.55rem 0 0.55re.........完整代码请登录后点击上方下载按钮下载查看
网友评论0