posts - 262,  comments - 221,  trackbacks - 0
          一、HTML中的外部樣式表(External Style Sheet):

          An external style sheet is ideal when the style is applied to many pages. Each page must link to the style sheet using the <link> tag. The <link> tag goes inside the head section.

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

          備注:每個引用外部樣式表的HTML文件都會通過一個<link>標簽指向該樣式表文件,該<link>標簽必須位于<head></head>內部


          二、HTML中的內部樣式表(Internal Style Sheet):

          An internal style sheet should be used when a single document has a unique style. You define internal styles in the head section with the <style> tag.

          <head>
          <style type="text/css">
          body 
          {background-color: red}
          {margin-left: 20px}
          </style>
          </head>

          備注:內部樣式表用于需要對單一HTML文件的樣式進行控制時,通過在<head></head>元素中插入<style></style>達到目的

          三、HTML中的內嵌樣式表(Inline Styles):

          An inline style should be used when a unique style is to be applied to a single occurrence of an element.To use inline styles you use the style attribute in the relevant tag. The style attribute can contain any CSS property.

          <style="color: red; margin-left: 20px">
          This is a paragraph
          </p>

          備注:內嵌樣式表用于需要對HTML文件中的某個元素外觀進行微調時,通過在該HTML元素中制定style屬性的值達到目的



          -------------------------------------------------------------
          生活就像打牌,不是要抓一手好牌,而是要盡力打好一手爛牌。
          posted on 2008-06-22 17:44 Paul Lin 閱讀(384) 評論(0)  編輯  收藏 所屬分類: Web基礎
          <2008年6月>
          25262728293031
          1234567
          891011121314
          15161718192021
          22232425262728
          293012345

          常用鏈接

          留言簿(21)

          隨筆分類

          隨筆檔案

          BlogJava熱點博客

          好友博客

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 冕宁县| 葵青区| 新邵县| 秭归县| 师宗县| 石楼县| 凤庆县| 永年县| 永泰县| 萨嘎县| 大港区| 太原市| 兴城市| 北京市| 平山县| 墨竹工卡县| 金华市| 股票| 湟源县| 普兰县| 通城县| 宝山区| 澜沧| 洛隆县| 安阳市| 曲周县| 武鸣县| 文水县| 林周县| 龙游县| 威远县| 交口县| 津市市| 观塘区| 濉溪县| 龙泉市| 内乡县| 钦州市| 陆河县| 剑川县| 安多县|