jQuery:如果我的 css 可见性:隐藏,我如何显示我的元素?
在我的CSS中我设置了一些元素visibiliy:hidden,我怎样才能显示它们?
我以前用不透明度做过,但我在 IE 中有一些错误:
var i = 0;
$mySelection.each(function(i) {
$(this).delay((i * 100) + ($mySelection.length)).animate(
{ opacity: "1"},
{queue:true, duration:1000, easing:"quartEaseIn"}
);
})
如果我想用 jQuery 而不是不透明度来控制可见性,我该怎么办? 谢谢
in my css i've set some elements visibiliy:hidden, how can I show them?
I've done it before with opacity, but i've some bug in IE:
var i = 0;
$mySelection.each(function(i) {
$(this).delay((i * 100) + ($mySelection.length)).animate(
{ opacity: "1"},
{queue:true, duration:1000, easing:"quartEaseIn"}
);
})
How can i do if I want controll visibility with jQuery instead of opacity?
thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
不要使用
visibility:hidden
,而是使用display:none
,然后如果您想淡入隐藏元素,请使用 淡入。例如:编辑:假设您想使用可见性,请尝试以下操作:
Rather than using
visibility: hidden
, usedisplay:none
, then if you want to fade in your hidden element use fadeIn. For example:Edit: Given that you want to use visibility, try this:
我使用此代码通过 Jquery 更改 CSS 可见性属性。悬停时的 element1 将改变 element2 的可见性。
对同一元素执行了两个不同的脚本以产生 mouseover-mouseleave 效果。
});
});
注意:Element2(CSS 受到影响)最初是隐藏的。所以当鼠标悬停在 Element1 上时,Element2 就会出现。当鼠标离开element1时,Element2再次隐藏。希望它有帮助
-此代码在堆栈溢出中重新研究和混合用户的一些其他代码的经验
I used this code to change the CSS visibility attribute with Jquery. Where the element1 on hover will change visibility of element2.
Did two different script for same element to give a mouseover-mouseleave effect.
});
});
Note.- That Element2 the one thats CSS is being affected, originally is hidden. so when mouse is over Element1, Element2 shows up. When mouse leaves element1, Element2 Hides again. Hope it helps
-Expiriance of this code reaserching and mixing some other codes from users in stack overflow
我希望这有帮助,我希望我理解你的问题:) http://api.jquery.com/show/< /a>
I hope this helps and I hope I understood your question :) http://api.jquery.com/show/
尝试
Try