How can I change the thickness of my
tag

前端 未结 9 1156
迷失自我
迷失自我 2020-12-22 17:07

I want to change the thickness of my horizontal rule (


)in CSS. I know it can be done in HTML like so -


9条回答
  •  余生分开走
    2020-12-22 17:40

    Here's a solution for a 1 pixel black line with no border or margin

    hr {background-color:black; border:none; height:1px; margin:0px;}
    
    • Tested in Google Chrome

    I thought I would add this because the other answers didn't include: margin:0px;.

    • Demo

    hr {background-color:black; border:none; height:1px; margin:0px;}
    ↑ container ↑


    ↓ hr ↓

    ↑ hr ↑


    ↓ container ↓

提交回复
热议问题