如何使用 CSS 创建虚线或任何类型的 hr 线(双线、虚线等) ?
<hr style="...what should I write?..." />
还有其他的把戏吗?
hr { border-top:1px dotted #000; /*Rest of stuff here*/ }
The <hr> tag is just a short element with a border:
<hr>
<hr style="border-style: dotted;" />
You can do:
<hr style="border: 1px dashed black;" />
Demo: http://jsfiddle.net/JMfC9/
<hr style="border-bottom: dotted 1px #000" />
You could just have <hr style="border-top: dotted 1px;" /> . That should work.
<hr style="border-top: dotted 1px;" />
hr { border: 1px dotted #ff0000; border-style: none none dotted; color: #fff; background-color: #fff; }
Try this