Html 如何创建虚线 <hr/> 标签?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16819864/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 08:53:54 来源:igfitidea点击:
How to create a dotted <hr/> tag?
提问by Amin Saqi
How can I create a dotted or any type of hr line (double, dashed etc.) using CSS?
如何使用 CSS 创建虚线或任何类型的 hr 线(双线、虚线等)?
<hr style="...what should I write?..." />
or is there any other trick?
还是有其他技巧?
回答by Annish
You could just have <hr style="border-top: dotted 1px;" />
. That should work.
你可以拥有<hr style="border-top: dotted 1px;" />
. 那应该工作。
回答by user2406160
hr {
border-top:1px dotted #000;
/*Rest of stuff here*/
}
回答by Zaziki
hr {
border: 1px dotted #ff0000;
border-style: none none dotted;
color: #fff;
background-color: #fff;
}
Try this
尝试这个
回答by tymeJV
回答by Blender
The <hr>
tag is just a short element with a border:
该<hr>
标签只是一个边境短路元件:
<hr style="border-style: dotted;" />
回答by karthikr
You can do:
你可以做:
<hr style="border-bottom: dotted 1px #000" />