CSS3手机网站源代码
/* 基础CSS重置 */
html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,i,u,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent;}
body {font-family:sans-serif;}
a {text-decoration:none;}
ul {list-style:none;}
/* 设备尺寸基础CSS */
html,body {width:100%;height:100%;margin:0;padding:0;}
body {font-size:14px;background-color:#f5f5f5;}
/* 公用类 */
.container {max-width:640px;margin:0 auto;}
.flex {display:flex;align-items:center;justify-content:center;}
.text-center {text-align:center;}
.mt-20 {margin-top:20px;}
/* 首页样式 */
.header {background-color:#4a90e2;color:#fff;height:50px;line-height:50px;text-align:center;}
.banner {height:180px;background:url(../images/banner.png) no-repeat center;background-size:cover;}
.banner-text {font-size:26px;color:#fff;margin-top:60px;}
.nav {background-color:#fff;}
.nav li a {display:block;padding:10px;color:#333;}
.product {background-color:#fff;}
.product .item {padding:20px;}
.product .item img {width:100%;}
.product .item h3 {font-size:16px;margin-top:10px;}
.product .item p {color:#999;margin-top:5px;}
/* 详情页样式 */
.detail-container {background-color:#fff;}
.detail-container .item h3 {font-size:20px;margin-top:20px;}
.detail-container .item p {color:#999;margin-top:10px;}
.detail-container .button-wrap {padding:20px;}
.detail-container .button-wrap .button {background-color:#4a90e2;color:#fff;}