HTML/CSS學習

樣式表style

   <style type="text/css">
      body {
        background-color: #d2b48c;//網頁背景顏色
        margin-left: 20%;//樣式表部分左邊距
        margin-right: 20%;//右邊距
        border: 1px dotted black;//設計邊框 粗細1px,黑色點線
        padding: 10px 10px 10px 10px;//設置四個內邊距
        font-family: sans-serif;//爲段落設置字體
      }
    </style>

1、border-style(邊框樣式)常見樣式有:

dashed(虛線)| dotted(點線)| solid(實線)。


2、border-color(邊框顏色)中的顏色可設置爲十六進制顏色,如:

border-color:#888;//前面的井號不要忘掉。


3、border-width(邊框寬度)中的寬度也可以設置爲:

thin | medium | thick(但不是很常用),最常還是用象素(px)。

 

<ol>
  <li>咖啡</li>
  <li>牛奶</li>
  <li>茶</li>
</ol>

<ol start="50">
  <li>咖啡</li>
  <li>牛奶</li>
  <li>茶</li>
</ol>

結果:

 blockquote 元素

在元素前後添加了換行,並增加了外邊距。

示例:

<html>
<body>

Here comes a long quotation:

<blockquote>
This is a long quotation. This is a long quotation. This is a long quotation. This is a long quotation. This is a long quotation.
</blockquote>

請注意,瀏覽器在 blockquote 元素前後添加了換行,並增加了外邊距。

</body>
</html>

ul標籤

<html>

<body>

<h4>一個無序列表:</h4>
<ul>
  <li>咖啡</li>
  <li>茶</li>
  <li>牛奶</li>
</ul>

</body>
</html>

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章