JavaScript: The Definitive Guide, Sixth Editio javaScript权威指南(第6版) pdf 文字版-文字版, javascript电子书, 和javascript 有关的电子书:

16.1.1 The Cascade

16.1.1 The Cascade

Recall that the C in CSS stands for “cascading.” This term indicates that the style rules that apply to any given element in a document can come from a “cascade” of different sources:

Styles from the style attribute override styles from stylesheets. And styles from a document’s stylesheets override the browser’s default styles, of course. The visual presentation of any given element may be a combination of style properties from all three sources. An element may even match more than one selector within a stylesheet, in which case the style properties associated with all of those selectors are applied to the element. (If different selectors define different values for the same style property, the value associated with the most specific selector overrides the value associated with less specific selectors, but the details are beyond the scope of this book.)

To display any document element, the web browser must combine the style attribute of that element with styles from all the matched selectors in the document stylesheets. The result of this computation is the actual set of style properties and values that are

16.1 Overview of CSS | 415

used to display the element. This set of values is known as the computed style of the element.

友情链接It题库(| 版权归yishouce.com所有| 友链等可联系|粤ICP备16001685号-1