A brief note of CSS

Selector: a selector is a indentifier with some CSS style descriptions. When you want to apply one style to the pages, just call a selector.

There are 3 basic types of selectors:

  • Type Selector, Rewrite HTML label styles.
  • Class Selector.
  • ID Selector.

There are more advanced selectors, such as Universal selector, Descendant selectors, Child selectors etc. See the office documentation about selector. And see more examples here: Part1, Part2, Part3.

Box Model: almost every element can be seen as box.

css_box_model.gif

3d-box-model.png

More details, see Office Documentation, and this entry.

div & float:

See Here.

Link extern CSS file:

HTML: <link href="*.css" type="text/css" rel="stylesheet">

XML: <?xml-stylesheet type="text/css" href="*.css"?>

We use CSS to seperate data from style.

转载请注明:来自pugWoo's Life
本文地址:http://www.pugwoo.com/2010/01/18/notes-of-css.html



6 条评论

我要留言