Disable underline for lowercase characters: g q p j y?

前端 未结 7 2233
清歌不尽
清歌不尽 2020-12-01 01:26

Sometimes you don\'t want an underline blindly cutting through an underlined page title!
Is there a way to automatically elegantly disable underline for

7条回答
  •  遥遥无期
    2020-12-01 02:13

    Here is my solution:

    Working Fiddle

    CSS:

    h1, h2 {
      background-image: linear-gradient(to top, transparent 0px, transparent .15em, red .15em, red calc(.15em + 1px), transparent calc(.15em + 1px), transparent 100%);
      text-shadow: 0px -2px 3px white, 0px -2px 3px white, 0px -2px 3px white, 0px -2px 3px white, 0px -2px 3px white, 0px -2px 3px white;
    }
    

提交回复
热议问题