
Cascading Style Sheets: The Definitive Guide, 2nd Edition is a thorough review of all aspects of CSS2.1 and a comprehensive guide to CSS implementation. The book includes new content on positioning, lists and generated content, table layout, user interface, paged media, and more. It explores in detail each individual CSS property and how it interacts with other properties, and shows how to avoid common mistakes in interpretation.
W3c的Css主页:
http://www.w3.org/Style/CSS/
1 css和document
1.1 elements
html中的元素很容易辨识,如p,table,span,a,div。
xml中元素由dtd定义,或者xml schema定义。每个元素部分代表了其表现方式。
Css中可以看作每个元素产生一个box,该box包含了元素的内容。
1.1.1元素类型:replaced和nonreplaced elements,block-level和inline-level elements
replaced elements:元素的内容可以被不是直接由文档表示的内容替换。典型的是xhtml中的img,它可以被指向文档外部的图片文件代替。
Input元素也可以根据其type的不同,而被radio button,checkbox,text input box代替。
Replaced elements也在显示时产生一个box。
Nonreplaced elements:html和xhtml的大多数元素是nonreplaced。就是说,这些元素的内容由用户代理(user agent,通常是指浏览器)在元素产生的box中来表述present。(box是不是指元素对应在页面上的一个region?)。
比如
© 版权声明
文章版权归作者所有,未经允许请勿转载。
相关文章
暂无评论...