Jun 5, 2011

CSS 文档和Tips

要查找详细的 CSS 参考,请点击这儿
特别其中的 Selector 说明,值得浏览
这儿有友好的CSS property 说明

selector {property: value;}
selector 对应 HTML 的 Tag,selector 中的 '.' 对应 Tag 中的 class,'#' 对应 Tag 中的 id.
class 和 id 区别是,一个 id 只能对应一个 element ,而许多 element 可以属于同一个 class.


z-index 放置的层次,能做出重叠的效果

When setting the style for several link states, there are some order rules:
  • a:hover MUST come after a:link and a:visited
  • a:active MUST come after a:hover

The :active pseudo-class applies while an element is being activated by the user. For example, between the times the user presses the mouse button and releases it.
The :focus pseudo-class applies while an element has the focus (accepts keyboard events or other forms of text input).

Table
隔行颜色区分:单数行和双数行 tr 设个 class不同

0 comments: