How can I change the thickness of my
tag

前端 未结 9 1138
迷失自我
迷失自我 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 18:02

    For consistency remove any borders and use the height for the


    thickness. Adding a background color will style your
    with the height and color specified.

    In your stylesheet:

    hr {
        border: none;
        height: 1px;
        /* Set the hr color */
        color: #333; /* old IE */
        background-color: #333; /* Modern Browsers */
    }
    

    Or inline as you have it:


    Longer explanation here

提交回复
热议问题