做者声明:本博客中所写的文章,都是博主自学过程的笔记,参考了不少的学习资料,学习资料和笔记会注明出处,全部的内容都以交流学习为主。有不正确的地方,欢迎批评指正html
@charset "UTF-8"; html, body { background: #f0f0f0; color: #505050; /* 不容许选中 */ -webkit-user-select: none; user-select: none; /* 去掉默认点击高亮显示 */ -webkit-tap-highlight-color: transparent; /*禁止长按连接与图片弹出菜单*/ -webkit-touch-callout: none; /*滚动平滑,另外有反弹的效果。*/ -webkit-overflow-scrolling: touch; } body, button, input, select, textarea { font: 14px/1.5 "\5b8b\4f53", "Helvetica Neue", Arial, "Liberation Sans", FreeSans, "Hiragino Sans GB", "Microsoft YaHei", sans-serif; line-height: 20px; } html, body, div, p, h1, h2, h3, h4, h5, h6, ul, ol, li, dl, dt, dd, pre, code, form, fieldset, legend, input, textarea, blockquote, th, td, hr, button, article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { padding: 0; margin: 0; } ul, ol { list-style: none; } html, body, form, fieldset, p, div, h1, h2, h3, h4, h5, h6 { /*阻止旋转屏幕时自动调整字体大小*/ -webkit-text-size-adjust: none; } table { border-collapse: collapse; border-spacing: 0; } image, fieldset { border: none; } a:focus, *:focus { outline: none; } h1, h2, h3, h4, h5, h6 { font-weight: normal; } /*取消按钮在inphone上的默认样式*/ input[type=button] { -webkit-appearance: none; outline: none; } input::-webkit-input-placeholder { /*修改webkit中input的planceholder样式*/ color: #969; } textarea::-webkit-input-placeholder { /*修改webkit中input的planceholder样式*/ color: #969; } input:focus::-webkit-input-placeholder { color: #969; } input::-webkit-input-speech-button { display: none; } a, button, input, optgroup, select, textarea { /*去掉a、input和button点击时的蓝色外边框和灰色半透明背景*/ -webkit-tap-highlight-color: transparent; color: inherit; } a { text-decoration: none; } .overflow-txt { white-space: nowrap; text-overflow: ellipsis; } .fl { float: left; } .fr { float: right; } .clearfix:before, .clearfix:after { display: table; content: " "; height: 0; font-size: 0; line-height: 0; } .clearfix:after { clear: both; } .block { padding: 0; margin: 0; display: block; } .layer-sep { height: 10px; background-color: #eee; }
其余常见的样式重置方式web