CSS學(xué)習(xí)筆記(二)

          Posted on 2008-10-28 20:10 胡娟 閱讀(227) 評論(0)  編輯  收藏

               鍵入外部樣式表文件

          先定義外部樣式表文件(all.css

          h1 {font: 15pt/17pt "Arial"; font-weight: bold; color: red}

          h2 {font: 13pt/15pt "Arial"; font-weight: bold; color: blue}

          再在basic.html中使用link對象

          <HEAD>

          <META http-equiv=Content-Type content="text/html; charset=utf-8">

          <META content="MSHTML 6.00.2900.3395" name=GENERATOR>

          <link rel=stylesheet href="F:"CSS"all.css" type="text/css">

          </HEAD>

          <BODY>

          <h1>您好!!!</h1>

          <p>春天花園芙蓉閣</p>

          </BODY>

          注意,style對象的type屬性設(shè)置為"text/css",是允許不支持這類型的瀏覽器忽略樣式表單。

          2.     定義內(nèi)部樣式塊對象

          basic.html文檔的<HTML><BODY>標(biāo)記之間插入一個<STYPE>…<STYPE>塊對象。

          <HEAD>

          <META http-equiv=Content-Type content="text/html; charset=utf-8">

          <META content="MSHTML 6.00.2900.3395" name=GENERATOR>

          <style type="text/css">

          <!--

          body {font: 10pt "Arial"}

          h1 {font: 15pt/17pt "Arial"; font-weight: bold; color: red}

          p {font: 10pt/12pt "Arial"; color: green}

          -->

          </style>

          </HEAD>

          <BODY>

          <h1>你好 </h1>

          <p> 春天花園芙蓉閣</p>

          </BODY>


          只有注冊用戶登錄后才能發(fā)表評論。


          網(wǎng)站導(dǎo)航:
           

          posts - 28, comments - 5, trackbacks - 0, articles - 1

          Copyright © 胡娟

          主站蜘蛛池模板: 潞城市| 姜堰市| 宜春市| 方山县| 武安市| 平塘县| 新昌县| 阿瓦提县| 花垣县| 武清区| 宁城县| 固始县| 新野县| 昆明市| 西昌市| 溆浦县| 宜良县| 古丈县| 汨罗市| 鄱阳县| 滦平县| 襄汾县| 东乡族自治县| 常州市| 仲巴县| 罗平县| 榆树市| 图片| 驻马店市| 长葛市| 镇安县| 桐乡市| 宾阳县| 深州市| 化州市| 都江堰市| 余江县| 雷州市| 炎陵县| 宣汉县| 象州县|