here is the sample: http://jsfiddle.net/Zg55k/
How can I change css background image and color smoothly with fade effect. When press background-image should fadeOut and background-color fadeIn in same time.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should make 2 layers. The layer that you want to fade in must have a higher z-index (or places below the other layer in the code) and have opacity: 0;
Then gradually change the opacity to 1, for exmaple with jQuery animate.
HTML:
CSS:
JS:
See jsFiddle:
http://jsfiddle.net/Mikey/9D32K/
You also may do
But then you should position the boxes absolute.