如何使用< hr>如何在CSS中添加多个水平线;元素?
我已经成功添加了1个水平行,但是当我尝试添加另一个(通过使用HTML中的多个< hr>
元素)时,它似乎不起作用。
HTML代码: < hr/>
CSS代码:
hr {
width: 90%;
height: 7px;
margin-left: 50px;
margin-right: auto;
background-color: #911637;
border: 0 none;
position: absolute;
top: 110px;
right: 85px;
left: 0px;
down: 0px;
}
I have already successfully added 1 horizontal line, but when I try to add another one (by using multiple <hr>
elements in the HTML), it doesn't seem to work.
HTML Code:<hr/>
CSS code:
hr {
width: 90%;
height: 7px;
margin-left: 50px;
margin-right: auto;
background-color: #911637;
border: 0 none;
position: absolute;
top: 110px;
right: 85px;
left: 0px;
down: 0px;
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先:,对于位置,使用
top
右
左
和bottom
bottom not完成
第二:,第二个
&lt; hr/&gt;
未显示的原因是bcs,因为它使用了绝对位置这是小型演示的链接,您可以在其中看到代码
codepen demo
first:, for position, use
top
right
left
andbottom
notdone
second:, the reason why the second
<hr/>
isn't showing is bcs it's on top of the first one, due to using absolute positionhere is a link for small demo where you can see the code
codepen demo