M站CSS全局样式
样式表一
/* 全局样式 */
html,body,div,span,h1,h2,h3,h4,h5,h6,a,em,img,p,dd,dl,dt,ul,li,ol,form,label,table,tr,td,input{
margin: 0;
padding: 0;
color: #333;
}
p{
font-size: 14px;
}
body{
width: 100%;
font-size: 12px;
font-family: 微软雅黑,Arial, Helvetica;
background-color: #f5f4f9;
}
a,a:link,a:visited{
text-decoration: none;
}
a:hover{
color: #e60012;
}
li{
list-style: none;
}
img{
border: none;
}
.clear{
clear: both;
}
样式表二
*,
::before,
::after{
margin: 0;
padding: 0;
-webkit-tap-highlight-color: transparent;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
body{
font-size: 14px;
font-family: "MicroSoft YaHei",sans-serif;
color: #333;
}
a{
color: #333;
}
a:hover{
text-decoration: none;
}
input{
border: none;
outline: none;
-webkit-appearance: none;
}
.f_left{
float: left;
}
.f_right{
float: right;
}
.clearfix::before,
.clearfix::after{
content: "";
height: 0;
line-height: 0;
display: block;
visibility: hidden;
clear: both;
}
样式表三(推荐)
使用CSS初始化 normalize.css
https://necolas.github.io/normalize.css
京东app首页样式
body{
width: 100%;
min-width: 320px;
max-width: 640px;
margin: 0 auto;
font-size: 14px;
font-family: -apple-system, Helvetica, sans-serif;
color: #666;
line-height: 1.5;
}
携程app首页样式
body{
max-width: 540px;
min-width: 320px;
margin: 0 auto;
font: normal 14px/1.5 Tahoma,"Lucida Grande",Verdana,"Microsoft Yahei",STXihei,hei;
color: #000;
background: #f2f2f2;
overflow-x: hidden;
-webkit-tap-highlight-color: transparent;
}
苏宁app首页样式
body{
min-width: 320px;
width: 15rem;
margin: 0 auto;
line-height: 1.5;
font-family: Arial, Helvetica;
background: #F2F2F2;
}
特殊样式
/* CSS3盒子模型 */
box-sizing: border-box;
-webkit-box-sizing: border-box;
/* 清除-点击高亮 */
-webkit-tap-highlight-color: transparent;
/* 清除ios默认样式 */
-webkit-appearance: none;
/* 禁用长安页面时弹出菜单 */
img,a{ -webkit-touch-callout: none;}