如何给网页添加水平线

转自于:https://www.douban.com/note/509201981/

前给网页添加分隔水平线,都是使用div的border-bottom来设置的,今天才发现用html的hr标签就可以,并且可以通过设置hr的宽度,高度,颜色来设置它的样式。
      例如:
      1.<hr style=" height:2px;border:none;border-top:2px dotted #185598;" />
           border-top:2px dotted #185598;是设置横线的样式
           dotted 虚线 #185598 颜色

 


       2.<hr style="height:1px;border:none;border-top:1px dashed #0066CC;" />
       3.<hr style="height:1px;border:none;border-top:1px solid #555555;" />

 


       4.<hr style="height:3px;border:none;border-top:3px double red;" />

 


       5.<hr style="height:5px;border:none;border-top:5px ridge green;" />

 


       6.<hr style="height:10px;border:none;border-top:10px groove skyblue;" />
border-top:10px groove skyblue; groove 上颜色 skyblue 下颜色

原文地址:https://www.cnblogs.com/Ao-min/p/14789627.html