淡入淡出的元素,不改变页面的布局 [英] Fading elements in and out without changing the layout of the page

查看:111
本文介绍了淡入淡出的元素,不改变页面的布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 fadeIn 时的正常行为和 fadeOut 是使用 display 属性



如何使 fadeIn fadeOut 不修改页面的布局?

解决方案


而不是 .fadeIn()您可以 .animate({opacity:1})

,而不是 .fadeOut(),您可以 .animate({opacity:0})


The normal behavior when using fadeIn and fadeOut is to use the display property. However, this changes the layout of the page.

How can I make fadeIn and fadeOut not modify the layout of the page?

解决方案

Also

instead of .fadeIn() you can .animate({opacity:1})
and instead of .fadeOut() you can .animate({opacity:0})

这篇关于淡入淡出的元素,不改变页面的布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆