How to Create a high-quality html page, the most important one is the style sheet, in addition to the style sheet, there are other factors, such as the minimum Page code volume, the minimum page request resources, for example, high-quality JS code can be used to open another topic. I personally propose a discussion draft for CSS organizations:
1. Define a common.css for global definition and definition of some common components, such as general layout, grid, header, banner, bottom, popwindow, dialoge, and other pages;
2. Each module defines a css file for all definitions of this module. The modules are divided as follows: home, info, and news), website Special Services (??) , Message board (bbs), login to register personal center merchant information (user), some content may be cross, for example, the seller information will have a style of information, do not cross reference, A small number of repeated definitions are allowed;
3. For details about the class name, refer to: csscommon naming convention and detailed description of .doc (baidu). We recommend that you name it by "module name_element type_function", such as home_table_nav and home_div_nav; general styles can be named in the format of grid_table_nav;
4. Try to use # ID and use cascade filtering to define the style. This reduces the number of class names written in HTML, in addition, we recommend that you use the preceding methods to unify the ID names, such as tblXXX, divXXX, and ulXXX;
5. Strictly prohibit pinyin letters or abbreviations. For example, xxfb stands for "information publishing", which is hard to understand;
6. If there are no special cases, it is not recommended to write style definitions directly in jsp or to write styles directly to elements. If the page needs to be left blank, for example, you can create a style file dedicated to the current page;
7. Install plug-in Dust-Me Selectors http://www.brothercake.com/dustmeselectors/ for style sheet check cleanup, clear unnecessary definitions;
8. We recommend that you use css sprite to define the background image involved in the style sheet to reduce the number of image requests. You can consider dividing the image by style file, A style file corresponds to a background image;