如何淡化显示:内联块 [英] How to fade to display: inline-block
问题描述
在我的页面中,我有一堆(大约30个)dom节点,应该添加为不可见,并在完全加载时淡入.
元素需要显示:内联块样式.
In my page I have a bunch (about 30) dom nodes that should be added invisible, and fade in when they are fully loaded.
The elements need a display: inline-block style.
我想使用jquery .fadeIn()函数.这要求元素最初具有显示:none;最初隐藏它的规则. 在fadeIn()之后,偏离路线的元素将具有默认显示:herit;
I would like to use the jquery .fadeIn() function. This requires that the element initially has a display: none; rule to initially hide it. After the fadeIn() the elements off course have the default display: inherit;
如何将淡入淡出功能与继承以外的显示值一起使用?
How can I use the fade functionality with a display value other than inherit?
推荐答案
您可以使用jQuery的动画函数自己更改不透明度,而不会影响显示.
You could use jQuery's animate function to change the opacity yourself, leaving the display unaffected.
这篇关于如何淡化显示:内联块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!