A website summarizes the default styles of IE6/7/8/9, ff3.6.3, WebKit (r7042), and opera10.51, so that we can better understand the differences in CSS writing.
Address: http://www.iecss.com/
After getting familiar with this, you can understand
I. Reasons for using CSS reset.
Ii. * {margin: 0; padding: 0;} Why is it not recommended?
Iii. Why is cssreset widely circulated on the Internet not promoted?
From the comparison diagram, we can see that some labels do not actually have margin or padding. Some of these labels are rarely used. Even if they are used, they are generally customized.
For general applications, a simple CSS reset (on-demand) is enough. For example:
body,p,dl,dd,h1, h2, h3, h4, h5, h6,form{ margin: 0; }
ul,ol,input,fieldset{ margin: 0; padding: 0; }
ul,ol{list-style-type: none;}
img{ border: 0; }
option,em{ font-style:normal}
a{ text-decoration: none; color: #c9c9c9;}
a:hover{ text-decoration: underline; color: #31c8e1;}
In addition, you can directly look at the default WebKit style table and find the input: Focus option to see why the chrome input box is selected with a yellow border by default.
You can simply remove and reset it.
Input, textarea {outline: none ;}
Textarea {resize: none;} // remove the default size of textarea and drag it
IE is not clear about viewing the default style of the browser,
FF has a method on the Internet: Resource: // GRE/RES/html.css. However, this seems to be available only in versions earlier than 4.0. Versions later than 4.0 are packaged into the Omni of the installation directory. jar.
I do not know about WebKit and opera at the moment ···
Http://meiert.com/en/blog/20070922/user-agent-style-sheets/