打印本文 打印本文 关闭窗口 关闭窗口
制作虚线效果的水平线
作者:武汉SEO闵涛  文章来源:敏韬网  点击数669  更新时间:2009/4/23 11:13:51  文章录入:mintao  责任编辑:mintao
  在网页中,一般要实现虚线效果。制作方法很多,在我们网站中,也介绍使用Fireworks制作虚线的效果。如果我们改用水平线制作虚线效果呢?制作方法就是使用CSS定义:

  在<head>中预先定义好CSS:
<STYLE type=text/css>
.dotline {
BORDER-BOTTOM-STYLE: dotted; BORDER-LEFT-STYLE: dotted; BORDER-RIGHT-STYLE: dotted; BORDER-TOP-STYLE: dotted
}
</STYLE>

  然后修改水平线的代码为:<hr class=dotline color=#000000 size=1>。按F12看看吧,效果是不是很不错!
  或者不预定义好CSS样式,直接在<hr>中加入代码:
<hr style="BORDER-BOTTOM-STYLE: dotted; BORDER-LEFT-STYLE: dotted; BORDER-RIGHT-STYLE: dotted; BORDER-TOP-STYLE: dotted" color=#000000 size=1>

  更为简单的方法:<hr style="border:1px dashed red; height:1px">

打印本文 打印本文 关闭窗口 关闭窗口