开发者

Having trouble with a dynamic fade in/fade out hover transition (jsfiddle included)

开发者 https://www.devze.com 2023-04-12 21:04 出处:网络
http://jsfiddle.net/XztsH/1/ The hover class seems to be pushed down a 20 pixel and I\'m not quite sure why.

http://jsfiddle.net/XztsH/1/

The hover class seems to be pushed down a 20 pixel and I'm not quite sure why.

Maybe it's la开发者_如何学Cte and my brain is dead...


The shift occured because the 'Close' text was occupying the line. Updated the fiddle for you: http://jsfiddle.net/XztsH/3/


Although you put the text far over the to left, it's still taking vertical space. The simplest fix would be to add this:

line-height: 0;

See it updated.

0

精彩评论

暂无评论...
验证码 换一张
取 消