R
R
Roman Deniskin2015-10-31 11:53:54
css
Roman Deniskin, 2015-10-31 11:53:54

How to make a smooth appearance of a new frame?

Greetings friends. I really need your help on this issue. I add CSS property transition: all 1000ms ease; class "active" via jquery. The "active" class is assigned to the currently active frame, but it appears as abruptly as without it. Why doesn't this method work? How to make the old frame fade out and the new one appear from a transparent background at a speed of 1 second?
Here is the script I'm working with: . Clicking on the arrows changes the frame.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Scribblex, 2015-10-31
@romka123

Hey! transition doesn't work with display property , use opacity instead . The transition property must be defined immediately, and not be hung / removed dynamically
.slider-item {
opacity: 0;
vertical-align: middle;
transition: all 1000ms ease;
width: 100%
}
.slider-item.active {
opacity: 1;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question