Web page construction teach you how to standardize naming CSS

CSS3 has been released, and many WEB front-end engineers have begun experimenting with the technology. How do we evaluate the ability to write CSS? We don’t judge by right and wrong. We may use the word "good", "generic", "bad" and so on. What’s the hardest part of CSS? Is it compatible with the major browsers? It’s the simplicity and efficiency of the code. The front engineer, the five fingers, once said, "CSS isn’t a difficult technology. It’s hard to pin down the name.". The project is done by individuals, and engineers can name CSS according to their own habits. In team work, the nonstandard naming side can cause conflicts and affect the progress of the project as a whole. The following south of the Five Ridges network teaches you how to standardize the naming of css.

division of CSS can have a variety of angles, such as classified by function: CSS fonts stored in font.css; will control the color of the CSS stored in the color.css; will control the layout of the CSS stored in the layout.css; or press block: the head of the CSS stored in the header.css; the bottom of the CSS stored in the footer.css sidebar will be stored; the sidebar.css will be stored in the main.css theme. Different angles have their own advantages and disadvantages.

The

south of the Five Ridges network recommends a CSS partitioning method: base.css+common.css+page.css. All styles of a web site are divided into three broad categories by functions: base, common, and page. In any web page, the final style is performed by the three.

The

base layer is the bottom of the page style required by the site. It’s relatively stable and basically doesn’t need maintenance. We usually store the following in base.css.

/*css reset for each browser will have the default default value of some attribute, so to get some attribute set */

body, div, DL, DT, DD, DL, ol, UL, Li, H1, H2, H3, H4, H5, H6, pre, form, fieldset, input textarea, P, blockquote, th, TD, {margin:0, padding:0; table{border-collapse:collapse border-spacing:0}; ol ul{list-style:none;   / * * / text layout.F12{font-size:12px}}.F13{font-size:13px;.F14{font-size:14px;   / * * /.Tl{> positioning