Answers:
例如:
hr {
border:none;
border-top:1px dotted #f00;
color:#fff;
background-color:#fff;
height:1px;
width:50%;
}
另见的样式<hr>
与CSS。
使用HTML:
<div class="horizontal_dotted_line"></div>
并在styles.css中:
.horizontal_dotted_line{
border-bottom: 1px dotted [color];
width: [put your width here]px;
}
您是说“边界:1像素点黑”吗?
这行应该为您工作:
<hr style="border-top: 2px dotted black"/>
.myclass {
border-bottom: thin red dotted;
}
像这样使用:
<hr style="border-bottom:dotted" />
为此,您只需要将border-top
或添加border-bottom
到<hr/>
标签中,如下所示:
<hr style="border-top: 2px dotted navy" />
您想要的任何线型或颜色
尝试破折号...
<hr style="border-top: 2px dashed black;color:transparent;"/>
元素后的虚线:
http://jsfiddle.net/korigan/ubtkc17e/
<h2 class="dotted-line">Lorem ipsum</h2>
.dotted-line {
white-space: nowrap;
position: relative;
overflow: hidden;
}
.dotted-line:after {
content: "..........................................................................................................";
letter-spacing: 6px;
font-size: 30px;
color: #9cbfdb;
display: inline-block;
vertical-align: 3px;
padding-left: 10px;
}