简体   繁体   中英

Why doesn't this div fade out slowly?

I have created a fiddle .

The modal fades in but not out, I've noticed if I add another css class

.out { opacity: 0 !important; }

and add that (rather than remove .in) it works. Why is this?

You need to add a default height attribute to the .fade class. Currently, when the .in class gets removed, the modal immediately loses it's height before the fade out animation

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM