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

后端 未结 6 1134
野的像风
野的像风 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:58

    Disclaimer: Chances are that this is not possible, but please consider this answer to be thinking out loud / suggestion of a place to start looking, than than working code.

    Is there possibility of highlighting the lines of text (with a colour that matches the background colour) and then adjusting the line-height such that the background of the lower lines overlap the underline?

    Pictures say a thousand words, so take a look at these:

    Before:
    enter image description here

    After:
    enter image description here

    From these mock-ups you can see that there are a couple of caveats and do not match exactly what is being asked for, but perhaps this is a starting point..?

提交回复
热议问题