简体   繁体   English

position:relative,overflow:隐藏父级和绝对子级

[英]position: relative, overflow: hidden parent and absolute child

Okay, here's an example: http://jsfiddle.net/jGLvk/405/ 好的,这是一个例子: http//jsfiddle.net/jGLvk/405/

If you hover the 9012 menu, you will have sliced dropped down submenu that is absolute. 如果您将9012菜单悬停,则会有切片下拉的子菜单,这是绝对的。 Remove position:absolute, or overflow:hidden from any of its parents: you will have normal working dropdown menu. 删除位置:绝对或溢出:隐藏任何父母:你将有正常的工作下拉菜单。

“Overflow-y:visible” will just generate a scrollbar instead of showing menu. “溢出-y:可见”只会生成滚动条而不是显示菜单。

Please help me! 请帮我! I need a regular superfish dropdown menu in such tricky ancestors. 我需要在这些棘手的祖先中使用常规的超级鱼类下拉菜单。

Thank you! 谢谢!

Here, take a look. 在这里,看一看。 I'm not sure what the overflow:hidden is for, but would it work applied to the div ul and not the div ? 我不确定overflow:hidden是什么,但它是否适用于div ul而不是div If so, well do it, and set the position: relative on the div. 如果是这样,那就做好,并在div上设置position: relative Take a look -> http://jsfiddle.net/jGLvk/407/ 看看 - > http://jsfiddle.net/jGLvk/407/

Since the absolutely positioned elements becomes relative to the div , it ignores the overflow:hidden; 由于绝对定位的元素变得相对于div ,它忽略了overflow:hidden; set on the ul . 设置在ul

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如果孩子的位置是绝对的,父母是溢出的:隐藏的,为什么孩子会溢出? - If the child is position:absolute and the parent is overflow:hidden, why does the child overflow? 溢出:隐藏+位置:固定父级-查看具有位置:绝对值的子级 - overflow: hidden + position: fixed parent - view child with position: absolute 相对父div内的两个绝对子div被overflow:hidden隐藏,希望将它们悬停在彼此上 - Two Absolute child divs inside relative parent div are hidden with overflow:hidden, expected to hover over eachother 隐藏溢出,父div处于绝对位置 - Overflow hidden with parent div in absolute position 溢出隐藏和 position 绝对用于子元素问题 - Overflow hidden and position absolute for child element issue 溢出隐藏不起作用,父母亲的位置 - overflow hidden not working, position of parent relative 绝对子元素相对于祖父元素的位置,而不是父元素......并且子元素应该保持隐藏状态直到被点击 - Position of absolute child element relative to grandparent, not parent... and child should remain hidden until clicked CSS如何使位置绝对子级在父级外部可见,并具有溢出:隐藏; - CSS how to have position absolute child visible outside of parent with overflow: hidden; Css 显示动态添加的子元素,position 绝对超过父元素,隐藏溢出 - Css display dynamically added child with position absolute over parent with overflow hidden CSS迫使孩子div离开具有绝对位置和溢出隐藏的父级 - Css force child div out of parent that has position absolute and overflow hidden
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM