关于CSS reset_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:46:03
Original
1208 people have browsed it

<strong>关于CSS reset</strong>CSS reset(css重置)基本上是不需要的,至少可以说80%的的CSS reset都是没有必要的,反而增加了页面CSS 的overwrite,尤其像开心网*{margin:0;}这样子业余的做法更是要不得(反而破坏了很多UI的兼容性,比如说单复选框等)。我不是一概鄙弃CSS reset,有些常用标签我也是会简单重置一下的,而且会避免overwrite(样式重写),以保证样式最精简,渲染最高效。如下代码示例:body{    line-height:1.4;    color:#333;    font-family:arial;    font-size: 12px;    background:white;}input,textarea,select{    font-size:100%;        font-family:inherit;}body,h1,h2,h3,h4,h5,h6,p,ul,ol,form{    margin:0;}h4,h5,h6{    font-size:1em;}ul,ol{    padding-left:0;     list-style-type:none;}img{border:0;}摘自 http://www.zhangxinxu.com/wordpress/2010/07/%e6%88%91%e6%98%af%e5%a6%82%e4%bd%95%e5%af%b9%e7%bd%91%e7%ab%99css%e8%bf%9b%e8%a1%8c%e6%9e%b6%e6%9e%84%e7%9a%84/
Copy after login

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!