html代码<hr>能设置成虚线吗?

代码怎么写?

<hr> 标签本身属性只有align、noshade、size、width;
并不包含线的样式,要想展示为虚线,只能通过css实现;
例如:
<hr style= "border:1px dashed #000" />

注:dashed就表示虚线;其它选择还有none:无样式;dotted:点线;solid:实线;double:双线;groove:槽线;ridge:脊线;inset:内凹;outset:外凸。
温馨提示:答案为网友推荐,仅供参考
第1个回答  2012-08-02
虚线用css来做.
border线型主要有:
1、dotted【点状】
2、solid【实线】
3、double【双实线】
4、dashed;【虚线】

如果一个CSS这样写:border-bottom:1px dashed #000000;
出来的框就是:一条宽度为1像素的黑色下划虚线。

例:<div style="border-bottom:1px dashed #000000;">虚线</div>本回答被网友采纳
第2个回答  2012-08-02
<hr style="border-bottom:1px dashed #000;">

1px 代表虚线宽度
dashed 线型为虚线
#000 线颜色黑色
第3个回答  2012-08-16
<style>
.class1{ border:1px; dashed #000;}
</style>
<body>
<hr class="class1">
</body>