我的移动端CSS公共样式

/*初始化样式*/
html, body, div, span, applet, 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, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header,
menu, nav, output, ruby, section, summary,
time, mark, audio, video, input {
    margin: 0;
    padding: 0;
    border: 0;
    font-weight: normal;
    vertical-align: baseline;
}
html, body {
    width: 100%;
    height:100%;
    font-family:"微软雅黑", arial, sans-serif, helvetica ,'Helvetica Neue';
    box-sizing: border-box;
    -webkit-box-sizing:border-box;
}
html {/*解决chrome浏览器下字体不能小于12px*/
  -webkit-text-size-adjust: none;
     -moz-text-size-adjust: none;
      -ms-text-size-adjust: none;
          text-size-adjust: none;
}
body {
    -webkit-text-size-adjust: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    line-height: 1;
}
em{
	font-style: normal;
}
em,i,span{
	display:inline-block;
}
article, aside, details, figcaption, figure,
footer, header, menu, nav, section {
    display: block;
}
blockquote, q {
    quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
    content: none;
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}
a {
    color: #7e8c8d;
    text-decoration: none;
    -webkit-backface-visibility: hidden;
}
li {
    list-style: none;
}
/*消除iphone手机input自带的样式和点击高亮*/
input[type="submit"], input[type="reset"], input[type="button"], input[type=date], button, select, input[type=text] {
    -webkit-appearance: none;
        -moz-appearance: none;
            appearance: none;
            cursor: pointer;
  	tap-highlight-color: transparent !important;
}
a, input[type=text], select, input[type=password], textarea {
  tap-highlight-color: transparent !important;
}
.clearfix::after {
  content: '';
  clear: both;
  display: block;
  line-height: 0;
  visibility: hidden;
  height: 0;
}
.clearfix {
  zoom: 1;
}
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track-piece {
    background-color: rgba(0, 0, 0, 0.2);
    -webkit-border-radius: 6px;
}
::-webkit-scrollbar-thumb:vertical {
    height: 5px;
    background-color: rgba(125, 125, 125, 0.7);
    -webkit-border-radius: 6px;
}
::-webkit-scrollbar-thumb:horizontal {
    width: 5px;
    background-color: rgba(125, 125, 125, 0.7);
    -webkit-border-radius: 6px;
}
.common_box{
	max-width: 640px;
	min-width: 300px;
	box-sizing: border-box;
	-webkit-box-sizing: border-box;
	margin: auto;
}
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>首页</title>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="format-detection" content="telephone=no" />
<meta name="format-detection" content="email=no" />
<meta name="format-detection" content="address=no;">
<meta name="msapplication-tap-highlight" content="no"/>


猜你喜欢

转载自blog.csdn.net/caimingxian401/article/details/80140461