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

后端 未结 11 911
旧巷少年郎
旧巷少年郎 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:12

    I had the same problem and my solution was to set height and overflow:hidden

    http://jsfiddle.net/r45L7/

    a {
        text-decoration: underline;
    }
    
    a:after {
        content: "»";
        display: inline-block;
        text-decoration: none;
        height:16px;
        overflow: hidden;
        padding-left: 10px;
    }
    

    It works on IE, FF, Chrome.

提交回复
热议问题