Make child visible outside an overflow:hidden parent

后端 未结 4 653
独厮守ぢ
独厮守ぢ 2020-11-28 03:02

In CSS the overflow:hidden is set on parent containers in order to allow it to expand with the height of their floating children.

But it also has anot

4条回答
  •  庸人自扰
    2020-11-28 03:23

    This is an old question but encountered it myself.

    I have semi-solutions that work situational for the former question("Children visible in overflow:hidden parent")

    If the parent div does not need to be position:relative, simply set the children styles to visibility:visible.

    If the parent div does need to be position:relative, the only way possible I found to show the children was position:fixed. This worked for me in my situation luckily enough but I would imagine it wouldn't work in others.

    Here is a crappy example just post into a html file to view.

    asd
    a

提交回复
热议问题