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

后端 未结 6 1122
野的像风
野的像风 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 11:14

    .title {
      width: 700px;
      overflow: hidden;
    }
    
    .title:after {
      content: '';
      display: inline-block;
      vertical-align: bottom;
      height: 1px;
      box-shadow: -100vw 100vw 0 100vw;
    }

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

提交回复
热议问题