CSS Initialization code

Source: Internet
Author: User

Why do you want to initialize CSS?

CSS initialization refers to the style of resetting the browser. The default styles for different browsers may vary, so the first thing to develop is how to unify them. If you do not initialize CSS, there will often be page differences between browsers. Each time the new development site or new Web page by initializing CSS style properties, for we will use the CSS or HTML tags more convenient and accurate, so that we develop the content of the Web page more convenient and concise, while reducing the amount of CSS code, save the page download time.

CSS Initialization Sample Code

/*CSS Reset www.admin10000.com*/
Body,p,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p, BLOCKQUOTE,TH,TD{margin:0;padding:0; }
Body{background:#fff;Color:#555;font-size:14px;font-family:Verdana, Arial, Helvetica, Sans-serif; }
td,th,caption{font-size:14px; }
H1, H2, H3, H4, H5, H6{Font-weight:Normal;font-size:100%; }
address, caption, cite, code, DFN, EM, strong, Th, var{Font-style:Normal;Font-weight:Normal;}
a{Color:#555;text-decoration:None; }
a:hover{text-decoration:Underline; }
img{Border:None; }
Ol,ul,li{List-style:None; }
input, textarea, select, Button{Font:14px Verdana,helvetica,arial,sans-serif; }
Table{Border-collapse:collapse; }
HTML{overflow-y:Scroll;}
/*CSS Common*/
. Clearfix:after{content: ".";Display:Block;Height:0;Clear:both;Visibility:Hidden;}
. Clearfix{*zoom:1; }

The above is the CSS reset code used by admin10000.com, this code is I prefer to use a way, although not perfect but the usual is almost all included.

default CSS styles under the main browsers : IE6 | IE7 | IE8 | IE9 | Firefox 3.6.3 | Webkit (r57042) | Opera 10.51

The following is a admin10000.com HTML template that is used for each new development page.

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.