使用者工具

網站工具


webdesign:head_rush_html_8_9

Head Rush HTML 讀書筆記

Chapter Eight

CSS

<style type="text/css">
  p { color: maroon; }
</style>
h1, h2 {
  color: gray;
}

CSS file

<link type="text/css" rel="stylesheet" href="filename.css" />

將頁面字型改成較易閱讀的 sans-serif。

font-family: sans-serif;

CSS 具有繼承特性,所有影響文字外觀的樣式皆是,而邊框等等的則不具繼承特性。可以使用更具體的選擇符來打斷繼承。

class

<p class="greentea">
p.greentea { ... }

修改所有類別。

.greentea { ... }

一個元素具有多個類別,以空白分隔。

<p class="greentea raspberry blueberry">

Chapter Nine

文字

font-family: Verdana, Geneva, Arial, sans-serif;
font-size: 14px;    // 150%  1.2em(父元素字型大小的 1.2 倍)
font-size: small;    // medium large x-large xx-large
color: silver;
font-weight: bold;
text-decoration: underline;
font-style: italic;   //斜體
line-height: 1.6em;  // 行高

字型家族

CSS 中設定 font-family:

  • Sans-serif - Arial Geneva
  • Serif - Times New Roman
  • Monospace - Courier New
  • Cursive - Comic Sans
  • Fantasy - Impact, LAST NINJA(少用)

色彩

網路安全色,使用色碼:http://en.wikipedia.org/wiki/Web_colors

webdesign/head_rush_html_8_9.txt · 上一次變更: 2007/08/11 17:35 由 wenpei