top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to use CSS3 Transitions ?

0 votes
310 views
How to use CSS3 Transitions ?
posted Jul 30, 2014 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

There can only be a transition for a CSS property from one value to another. For a fade transition, the opacity should go from 0 to one.

CSS

.foo {
   opacity: 0;
   transition: all 400ms;
}
.foo.active {
   opacity: 1
}

The property display that assign the method toggle () can't be animated with the CSS transitions. Maybe you want to look at fadeIn() and fadeOut().

Edit

Another method fadeToggle() i don't know much about it but you can search and use this:

$('.back-fade').click(function(){
  $('#welcome-content').fadeToggle(2000);
  $('#configure-content').fadeToggle(2000);        
});
answer Aug 4, 2014 by Rahul Singh
...