override overflow:hidden with z-index

前端 未结 6 1425
误落风尘
误落风尘 2021-01-11 13:41

Am using coda_bubble jquery plugin, and i need to make my bubble pop out within an overflow hidden div. here is my sample code.



<         


        
6条回答
  •  醉话见心
    2021-01-11 14:05

    You can't. overflow: hidden; Hides content outside the element. Period.

    z-index applies to absolute AND relatively positioned elements, just differently, despite what someone else said.

    EDIT You could put some padding-top on that particular div, if you can live with that padding, that is. The div would need to be a little wider, too.

    EDIT 2 As others have stated, though position: relative; and position: absolute; are probably more common, yes, z-index works with position: fixed; also, just not for position: static; I overlooked those.

提交回复
热议问题