JQuery: Children Disappear on Parent Size Animation

跟風遠走 提交于 2019-12-01 05:56:37

Based on the answer from David, you can add overflow: visible !important to your CSS to force the children elements to remain visible.

div 
{
    position:absolute;
    width:40px;
    height: 40px;
    background: #f00;
    overflow: visible !important; /* Superset jQuery#animate() 'overflow:hidden'  
}

It works with your example but you might have unwanted result with a more complex HTML tree.

I notice a strange effect if you mouse over a parent then the children: multiple element zoomed at once. Perhaps it is what you want. If not, a better solution might be to change the HTML source to wrap a 'zoomable' content element inside a tree structure formed of divs.

As part of the animate method, it sets an overflow:hidden style to the parent element. That temporarily hides the child blocks. That is maybe a clue, but I don't know what the best way to avoid it would be.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!