“text-decoration” and the “:after” pseudo-element, revisited

后端 未结 11 955
旧巷少年郎
旧巷少年郎 2020-11-27 18:43

I\'m re-asking this question because its answers didn\'t work in my case.

In my stylesheet for printed media I want to append the url after every link using the

11条回答
  •  不知归路
    2020-11-27 19:30

    As an alternative, you can use a bottom border rather than a text-decoration. This assumes that you know the color of the background

    a {
      text-decoration: none;
      border-bottom: 1px solid blue;
    }
    a:after {
      content: "foo";
      border-bottom: 1px solid white; /* same color as the background */
    }
    

提交回复
热议问题