移动端项目构建?

1.首先引入meta标签设置移动端

2.公共样式css

html,body,ul,li,img,a,p,div{

margin:0;

padding:0;

设置盒模型

border-sizing:border-box;

去除移动端特有的点击高亮的效果

-webkit-tap-highlight-color:transparent;

}

body{

font-family:"微软雅黑",sana-serif;

font-size:13px;

overflow-x:hidden;

100%;

height:100%;

max-750px;

margin:0  auto;

text-size-adjust:none;

-moz-text-size-adjust:none;

-webkit-text-size-adjust:none;

}

a,

a:hover{

color:#666;

text-decoration:none;

-webkit-tap-highlight-color:rgba(0,0,0,0);

}

 input{

outline:none;

}

img{

display:block;

border:none;

vertical-align:top;

}

ul,li{

list-style-type:none;

}

清除浮动

.clear{

 display:block;

overflow:hidden;

clear:both;

height:0;

line-height:0;

font-size:0;   

}

.clearfix:after{

content:".";

display:block;

height:0;

clear:both;

wisibility:hidden;

}

 .clearfix{

*zoom:1;

}

原文地址:https://www.cnblogs.com/duanzhange/p/9396955.html