<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 4 年前。
标签 jquery css positioning
<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 4 年前。
我想在元素移出容器时隐藏它。但我有 1 个限制:我不能使用 overflow: hidden;
作为容器中的永久样式。
这是我需要的链接:
我想知道是否有一种方法可以在它出去时做一些类似消失的事情来完成它? ...可能在完成动画时给出临时 overflow: hidden
。
最佳答案
$().ready( function(){
$( "#hide-span" ).click( function(){
$( ".contained" ).animate( {
left: "-250",opacity:"0"
}, 1000 );
} );
} );
或
$().ready( function(){
$( "#hide-span" ).click( function(){
$( ".contained" ).animate( {
left: "-250"
}, 1000 );
$( ".contained" ).fadeOut(200);
} );
} );
关于jquery - 将元素隐藏在容器外而不溢出 : hidden,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12548550/