2000字范文,分享全网优秀范文,学习好帮手!
2000字范文 > css-reset样式重置

css-reset样式重置

时间:2022-03-20 19:55:12

相关推荐

css-reset样式重置

移动端:

html, body { -webkit-user-select: none; /* 禁止选中文本(如无文本选中需求,此为必选项) */user-select: none; }a, img { -webkit-touch-callout:none; /* 禁止长按链接与图片弹出菜单 */}body,input,select,button{font:1.2rem normal "Helvetica Neue", Helvetica, STHeiTi, sans-serif;}address, cite, dfn, em, var { font-style: normal; } /* 将斜体扶正 */code, kbd, pre, samp, tt { font-family: "Courier New", Courier, monospace; } /* 统一等宽字体 */small { font-size: 1rem; } /* 小于 12px 的中文很难阅读,让 small 正常化 */body, h1, h2, h3, h4, h5, h6, hr, p, blockquote,dl, dt, dd, ul, ol, li, pre, /* text formatting elements 文本格式元素 */fieldset, lengend, button, input, textarea, /* form elements 表单元素 */th, td { margin:0;padding:0;}input,button,select,img{margin:0;line-height:normal}select{padding:1px}ul,ol{list-style:none}select,input,button,button img,label{vertical-align:middle}header,footer,section,aside,nav,hgroup,figure,figcaption{display:block;margin:0;padding:0;border:none;} /*HTML5标签变块级*/a{text-decoration:none;} /*重置链接下划线*/img {max-width:100%;height:auto; border:none;}/* 浮动及边常用边距 */.fL{float:left;}.fR{float:right;}.mL10{margin-left:10px;}.mB10{margin-bottom:10px;}/*清除浮动*/.clear{clear:both;}.clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}.clearfix{display:inline-block}* html .clearfix{height:1%} /* Hides from IE-mac \*/.clearfix{display:block}/* End hide from IE-mac */

PC端

body,input,select,button{/*font: 12px/1 Tahoma, Helvetica, Arial, "宋体", sans-serif;*/font: 12px/1 Tahoma, Helvetica, Arial, "\5b8b\4f53", sans-serif; /* 用 ascii 字符表示,使得在任何编码下都无问题 for PC端 */}body{font-size:12px;line-height:166.6%;} /*pc端常设置字体大小及间距*/h1 { font-size: 18px; /* 18px / 12px = 1.5 */ }h2 { font-size: 16px; }h3 { font-size: 14px; }h4, h5, h6 { font-size: 100%; }address, cite, dfn, em, var { font-style: normal; } /* 将斜体扶正 */code, kbd, pre, samp, tt { font-family: "Courier New", Courier, monospace; } /* 统一等宽字体 */small { font-size: 12px; } /* 小于 12px 的中文很难阅读,让 small 正常化 */body, h1, h2, h3, h4, h5, h6, hr, p, blockquote,dl, dt, dd, ul, ol, li, pre, /* text formatting elements 文本格式元素 */fieldset, lengend, button, input, textarea, /* form elements 表单元素 */th, td { margin:0;padding:0;}input,button,select,img{margin:0;line-height:normal}select{padding:1px}ul,ol{list-style:none}select,input,button,button img,label{vertical-align:middle}header,footer,section,aside,nav,hgroup,figure,figcaption{display:block;margin:0;padding:0;border:none;} /*HTML5标签变块级*/a{text-decoration:none;} /*重置链接下划线*/img{border:none;}/* 浮动及边常用边距 */.fL{float:left;}.fR{float:right;}.mL10{margin-left:10px;}.mB10{margin-bottom:10px;}/*清除浮动*/.clear{clear:both;}.clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}.clearfix{display:inline-block}* html .clearfix{height:1%} /* Hides from IE-mac \*/.clearfix{display:block}/* End hide from IE-mac */

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。