Hovered element to overflow out from an overflow:hidden element css

后端 未结 7 2356
陌清茗
陌清茗 2021-02-13 12:55

I have made a fiddle for reference: http://jsfiddle.net/kLFn9/

The overflow:hidden in question is highlighted.

Basically, i\'m using :hover:af

7条回答
  •  庸人自扰
    2021-02-13 13:32

    Unfortunately, there's no (easy) way to allow a child tag to override the effects of the overflow:hidden declaration on the parent div. See: Allow specific tag to override overflow:hidden

    Your only possible recourse would be with javascript: first grab the span's offset relative to the document, then move it to another location in the DOM (i.e. direct child to the body), set its position to absolute, and use the offsets you grabbed to set its left and top properties, that would locate it at the same position within the document, but now it's not contained by the div, and so no longer needs to obey overflow:hidden.

提交回复
热议问题