Advanced CSS challenge: underline only the final line of text with CSS

后端 未结 6 1124
野的像风
野的像风 2020-12-14 10:58

I want to underline the final line of multi-line text, or at least create the allusion of it. Look closely at the following examples, because I\'m trying to do something tri

6条回答
  •  独厮守ぢ
    2020-12-14 10:59

    If this is the text "A line of text that is long enough so that it wraps to another line." and you want to underline "it wraps to another line." all you need is to use the selector.

    For Html:

    A line of text that is long enough so that it wraps to another line.

    For CSS:

    div last{
        text-decoration: underline;
    }
    

提交回复
热议问题