Text-decoration being cut off by overflow:hidden i

2019-07-26 01:46发布

So I'm using the OOCSS media module and I'm putting a link inside of it and the last line of the link is being cut off.

To explain for anyone who doesn't know about the framework, it's simple to explain: imagine an element with overflow: hidden, and a link inside that element. That's ALL.

If I put a link inside of this element with overflow: hidden, the last text-decoration line of the link is cut off thanks to overflow: hidden. Without having to resort to padding & margin (and hopefully floats) is there anyway to compensate for that last line being cut off? Chrome seems to get this right, not sure though.

2条回答
放我归山
2楼-- · 2019-07-26 02:22

Actually there was another question very similar to this recently, you can see my answer there: Html anchor height issue with unitless line heights

So I don't think there's a solution to your question, but I wanted to note that while Chrome gets it right for overflow hidden, when you use overflow auto it's actually a problem as you'll see in that post.

查看更多
Luminary・发光体
3楼-- · 2019-07-26 02:33

try to set the line height on the text

line-height:1.5;
查看更多
登录 后发表回答