How can I fade in new HTML elements with CSS -
this question has answer here:
- using css fade-in effect on page load 3 answers
how possible make new html elements fade in using css without bit of javascript?
you can use css transitions
here sample code:
<style> .swapme img { -webkit-transition: 1s ease-in-out; -moz-transition: 1s ease-in-out; -ms-transition: 1s ease-in-out; -o-transition: 1s ease-in-out; transition: 1s ease-in-out; } .swap1, .swapme:hover .swap2 { -webkit-opacity: 1; -moz-opacity: 1; opacity: 1; } .swapme:hover .swap1, .swap2 { -webkit-opacity: 0; -moz-opacity: 0; opacity: 0; } </style> <div class="swapme"> <img src="http://0.tqn.com/d/webdesign/1/0/d/m/1/jaryth1.jpg" class="swap1" style="position: absolute;"> <img src="http://0.tqn.com/d/webdesign/1/0/e/m/1/jaryth2.jpg" class="swap2"> </div>
Comments
Post a Comment