Html --用簡單的<hr>實現多樣化分割效果

來源:互聯網
上載者:User

標籤:orm   get   排列   顯示   .sh   enter   str   shadow   ash   

 

最基本的:<hr width=300 size=1 color=#5151A2 align=center noshade>。

<!--其中 width 規定線條的長度,還可以是百分比;color 表示顏色,size 表示厚度;align 規定線條位置,有left、right、center;noshade 表示是否有立體效果-->

  兩頭漸層透明:

<hr width=80% size=3 color=#5151A2 style="FILTER: alpha(opacity=100,finishopacity=0,style=3)">

--------------------------------------------------------------------------------

  右邊漸層透明:

<hr width=80% size=3 color=#5151A2 style="FILTER: alpha(opacity=100,finishopacity=0,style=1)">

--------------------------------------------------------------------------------

  畫虛線:

<hr width=80% size=1 color=#5151A2 style="border:1 dashed #5151A2">

--------------------------------------------------------------------------------

  畫雙線:

<hr width=80% size=3 color=#5151A2 style="border:3 double green">

--------------------------------------------------------------------------------

  立體效果:

<hr width=80% size=3 color=#5151A2 style="filter:progid:DXImageTransform.Microsoft.Shadow(color#5151A2,direction:145,strength:15)">

--------------------------------------------------------------------------------

  紡棰形:

<hr width=80% size=30 color=#5151A2 style="filter:alpha(opacity=100,finishopacity=0,style=2)">

--------------------------------------------------------------------------------

  鋼針效果:

<hr width=80% size=3 color=#5151A2 style="filter:progid:DXImageTransform.Microsoft.Glow(color=#5151A2,strength=10)">

 

<hr>標籤的作用是產生一線水平線

<hr>標籤的屬性包括

屬性 值 描述 DTD align  center left right 規定水平線的排列。 TF noshade noshade  當設定為 true 時,水平線呈現為純色(2D 效果)。

當設定為 false 時,水平線顯示為雙色凹槽(3D 效果)。

TF size  pixels % 規定水平線的厚度(高度)。 TF width  pixels % 規定了水平線的寬度。 TF 看下面的例子

<hr align="center">

<hr align="left">

<hr align="right">

<hr noshade="true">

<hr noshade="false">

<hr size="5">

<hr width="500px">

<hr align="left" noshade="false" size="4" width="500px" color="#ff0000">

顯示結果分別為:

沒有設定寬度的水平線預設為100%,所以前三條設定的對齊看不到效果

 

1、普通分隔線:<hr>

2、分隔線寬度屬性:<hr width=50%> 或者 <hr width=250> (寬度為實際點數或百分比)

3、分隔線位置屬性:<hr align=right width=50%> (位置分為 Left、Center、Right 三種)

4、分隔線厚度屬性:<hr style="height:10px"> (奇怪,height=10 似乎不能起到效果)

5、分隔線無陰影屬性:<hr style="height:10px" noshade>

6、分隔線彩色屬性:<hr color=red> 或者 <hr color=#FF0000> (顏色可調)

7、漸層顏色的分隔線: <hr style="filter:alpha(opacity=5,finishopacity=100,style=1);height:10px" color=green>

<hr style="filter:alpha(opacity=100,finishopacity=5,style=1);height:10px" color=blue>

8、中心透明的分隔線: <hr style="filter:alpha(opacity=0,finishopacity=100,style=2);height:12px" color=orange>

<hr style="filter:alpha(opacity=0,finishopacity=100,style=3);height:12px" color=#FF00FF>

9、中心不透明的分隔線: <hr style="filter:alpha(opacity=100,finishopacity=0,style=2);height:15px" color=yellow>

<hr style="filter:alpha(opacity=100,finishopacity=0,style=3);height:15px" color=#00FFFF>

10、波浪線: <hr style="filter:wave(strength=9,freq=2,lightstrength=20,phase=9);height:15px" color=pink width=95%>

11、三色線: <hr style="border-top: #ff0000 solid; color: #00ff00; border-bottom: #0000ff solid; height: 9px">

12、虛線: <hr style="border-top: 2px dashed; border-bottom: 2px dashed; height: 2px" color=black>

13、豎線: <hr style="height:100px; width:4px" color=orange>

<hr style="filter:alpha(opacity=100,finishopacity=5,style=2); height:100px; width:5px" color=navy>

<hr style="filter:alpha(opacity=0,finishopacity=100,style=2);height:100px; width:4px" color=red>

 

額,來源記不清了。

Html --用簡單的<hr>實現多樣化分割效果

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.