Compared with the previous version, Dreamweaver CS3 is more standardized for CSS writing. Let's take a look at its CSS layout rules.CSS file link
· Additional link: external CSS file
· Import CSS: when multiple CSS files are frequently used, multiple CSS files are imported into one CSS file.
There are three types of CSS rule definitions:
1) classes such as ". RedText", ". BlueText", and ". BigText"
2) Tag re-CSS definition for the original HTML Tag
3) Advanced pseudo classes, elements defining IDs, and comprehensive definitions
CSS rule application
· Only the "class" style needs to be applied, class = "xxxx ". Any element can be applied to classes.
· Differences between class and id
· Tag applications are generally used at one time for "body" tags. It is not recommended to define tags that are highly repetitive on pages, such as "li" and "td.
· It is much better to define "# id li" than to define "li.
Execution sequence of CSS rules
· Follow the sequence of CSS Code Execution
· If there are repeated rules, follow the subsequent execution Definition
· The final rule is a combination of multiple defined rules
Key: Advanced rule Definition
1. Define text styles for different tables. (Use different IDs and class style definitions for different tables)
2. Definition of multiple hyperlink styles on the first page
3. Multiple CSS definitions for different objects with the same rules
4. Which of the following is more scientific (scalability and code streamlining) for multiple CSS methods defined for the same object)
|
Figure 1 create a CSS rule in Dreamweaver |