Edit line thickness of CSS 'underline' attribute

前端 未结 11 650
日久生厌
日久生厌 2020-12-02 07:35

Since you can underline any text in CSS like so:

h4 {
    text-decoration: underline;
}

How can you also then edit the \'line\' that is drawn

11条回答
  •  借酒劲吻你
    2020-12-02 08:15

    Here is one way of achieving this :

    HTML :

    This is a heading

    This is another heading

    ​CSS :

     u {
        text-decoration: none;
        border-bottom: 10px solid black;
      }​
    

    Here is an example: http://jsfiddle.net/AQ9rL/

提交回复
热议问题