柯南 Become Professional


2009-04-03

简单而有效的html画线代码

1,561 views, 技术, by 许石南.
0
顶一下

提到分割线,大家习惯使用长条形图片,或者用小图片作为平镨背景来实现。
这样当然可以随心所欲地达到要求,但图片文件毕竟需要找空间上传,也多少会拖慢下载速度。
其实简单的“hr”语句同样能够实现多样化的分割效果,试举例如下:
最基本的:
<*hr width=300 size=1 color=#00ffff align=center noshade*>
其中 width 规定线条的长度,还可以是百分比;color 是颜色,size 当然就是厚度了。
align 规定线条位置,left、right、center。

noshade 是否有立体效果:



<*HR align=center width=300 color=#00ffff noShade SIZE=1*>

两头渐变透明:


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

右边渐变透明:


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

画虚线:


<*hr width=80% size=1 color=#00ffff style="border:1 dashed #00ffff"*>

画双线:


<*hr width=80% size=3 color=#00ffff style="border:3 double green"*>

立体效果:


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

钢针效果:


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

纺棰形:


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

以上所有效果不是孤立的,它们可以相互组合,从而产生新的效果。(以上所有例子请把*去掉)。

分享家:Addthis中国

相关文章:

  • 未找到相关内容

Back Top

评论 (1) 引用 (1) 发表评论 引用地址
  1. Hello there, You have done a great job. I will definitely digg it and for my part recommend to my friends. I am confident they will be benefited from this website.

  1. lose weight fast (,2010-04-15)

    lose weight fast…

    If you’re looking to lose weight fast then you should really try Acai berries. Free trial!…

发表评论

电子邮件地址不会被公开。 必填项已被标记为 *

*