How to do CSS layout?
How to link CSS files
1. Additional links: external CSS files
2. Import CSS: When applying multiple CSS files, import multiple CSS into one CSS file.
There are three types of CSS rule definitions
1. Classes such as “.RedText”, “.BlueText” and “.BigText” etc.
2. Re-definition of CSS tags based on original HTML tags 3. Advanced pseudo-classes, elements with IDs defined, and comprehensive definitions
Application of CSS rules
1. Only "class" styles need to be applied, class="xxxx". Any element can have classes applied to it.
2. The difference between class and id
3. Tag application is generally for one-time use of the "body" tag. It is not recommended to define tags such as "li" and "td" that are repetitive in the page.
4. For advanced applications, defining "#id li" is much better than defining "li".
Execution order of CSS rules
1. Follow the execution order of CSS code
2. If there are duplicate rules, execute them according to the definition
3. The final rule is the synthesis of multiple defined rules
Focus: Advanced Rule Definition
1. Definition of text styles for different tables. (Different tables use different IDs and class style definitions)
2. Multiple hyperlink style definitions on one page
3. Multiple CSS definitions of different objects with the same rules
4. For multiple CSS methods defined for the same object, consider which one is more scientific (scalability and code simplicity)