Is there a way to only fade in an element using the CSS transition property? Never really had the need for this before so haven't looked into it, and now I can't seem to find a method of doing so without resorting to JS. Is it possible to set transition to have an immediate return state?
相关问题
- Adding a timeout to a render function in ReactJS
-
Why does the box-shadow property not apply to a
- Add animation to jQuery function Interval
- jQuery hover to slide?
- Issue with star rating css
This will fade-in / fade-out on mouse-in / mouse-out. You can set the original opacity to 0 and apply this to your situation.
fiddle
http://jsfiddle.net/7uR8z/6/
There a couple ways to do this, depending on when you want your fade in to occur:
jsFiddle
Note: to fade in on page load you need a simple keyframe animation, not a transition.