html分割线(分割线代码汇总)

 分类:html知识时间:2022-07-12 07:30:56点击:

hr是一个HTML标签,是标签定义HTML 页面中的主题变化,并显示为一条水平线就是分割线,hr标签是单标签没有结束标签。本文主要内容是html分割线,汇总整理了各种分割线代码。

html分割线

一、基本分割线线条hr:

1、<hr>

2、align线条位置(可选left、right、center);width线条长度;color颜色;size厚度

<hr align=center width=300 color=#987cb9SIZE=1>

二、特效,效果并不是孤立的,可相互组合

1、两头渐变透明:

<hr style="FILTER:alpha(opacity=100,finishopacity=0,style=2)" width="80%"color=#987cb9 SIZE=10>

2、纺锤形:

<hr style="FILTER:alpha(opacity=100,finishopacity=0,style=1)" width="80%"color=#987cb9 SIZE=3>

3、右边渐变透明:

<hr style="FILTER:alpha(opacity=0,finishopacity=100,style=1)" width="80%"color=#987cb9 SIZE=3>

4、左边渐变透明:

<hr style="border:1 dashed #987cb9" width="80%"color=#987cb9 SIZE=1>

5、虚线:

<HR style="border:3 double #987cb9" width="80%"color=#987cb9 SIZE=3>

6、双线:

<hr style="FILTER:progid:DXImageTransform.Microsoft.Shadow(color:#987cb9,direction:145,strength:15)"width="80%" color=#987cb9 SIZE=1>

7、立体效果:

<hr style="FILTER:progid:DXImageTransform.Microsoft.Glow(color=#987cb9,strength=10)"width="80%" color=#987cb9 SIZE=1>

8、钢针效果:

<table border="1px" cellpadding="0" cellspacing="0"style="height:265px;border-left-style:solid;border-bottom-style:none;border-right-style:none;border-top-style:none">

9、垂直分割线

<table border="1px" cellpadding="0" cellspacing="0"style="height:265px;border-left-style:solid;border-bottom-style:none;border-right-style:none;border-top-style:none">

三、虚线的分割线代码

1、HTML代码:

<hr style="border: 1px dotted #FF0000; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px">

2、HTML代码:

<style>hr { color:red;border:dashed;}</style><hr>

3、HTML代码:

<script>for(i=0;i<300;i++){document.write(".");}</script>

4、js代码:

<script>for(i=0;i<300;i++){document.write(".");}</script>

5、HTML代码:

<hr style="border:1px dashed #000; height:1px">


除注明外的文章,均为来源:老汤博客,转载请保留本文地址!
原文地址: