OO CSS Try: Object-Oriented Style Table Practice
How do artists and programmers work? My answer is CSS that rely on this rule because of the structural comparisons, so you can generate Table but universal and programmakers by fixed taglib. Web programmers who are familiar with CSS / SCRITPT
I thought that the CSS similar to the object-oriented approach was used. The main design idea is as follows.
For some type of table, there will be multiple times in the system, such as for displaying news, showing an announcement, etc. Therefore, this Table is summarized as a CSS, and these different CSSs have some common. Code: sampletable.css.sampletable {}
Sampletable2.css.sampletable2 {} such as heads, data lines, etc., many elements are the same. So make a CSS template, which is implemented by the technique inherited by CSS attribute. Code: .sampletable1 {} .sampletable1 tbody .text {} .sampletable2 {} .sampletable2 tbody .text {} Why is OO's CSS?
Because this CSS draws on the OO's idea, inherit, abstraction, and polymorphism
Inherit, that is, the CSS Class inherits the attribute of the parent class, such as. Table Tbody abstraction, is abstract as a described name, such as .text
At the time of application, the above .Table .Label .Menu, etc., can be seen as the same interface for the different CSS implementations. If .TABLE1 .TABLE2 should have .Label .ment
One