DIV CSS 佈局教程網

您现在的位置: DIV+CSS佈局教程網 >> 網頁腳本 >  >> HTML基礎知識 >> HTML和Xhtml
hr 水平線樣式範例整理
編輯:HTML和Xhtml     

<hr> 是語意上代表分段的水平線標籤,透過 style 屬性能做出多種不同的視覺樣式,例如實線、雙線、點狀線與不同顏色粗細。以下整理幾種常見寫法:

<hr style="width:490px;" />
<hr size="8" style="color:#ffd306; border-style:outset; width:490px;">
<hr size="1" style="color:#ff9999; border-style:double; width:490px;">
<hr size="1" style="color:blue; border-style:dotted; width:490px;">
<hr size="1" style="width:490px; height:3px; border:none; border-top:3px double red;">
<hr align="center" width="1" color="red" size="100">

其中 border-style 可設為 outset(立體外凸)、double(雙線)或 dotted(點狀);若想用 border-top 單獨控制線條樣式,記得先把其他 border 設為 none,才能呈現乾淨的效果。搭配 width、color 與 size,就能變化出各種分隔線外觀。

XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved