, , - , JavaScript .
Just place the image container above the text and disappear, as you already did:
Javascript
$(function() {
setTimeout(function()
{
var $el = $('div#outer');
$el.fadeOut("slow", $el.remove);
}, 5000);
});
HTML
<div class="transition-wrapper">
<div id="outer">Image here</div>
<div id="text">Text here</div>
</div>
CSS
Please note that the colors here are for illustration purposes only.
.transition-wrapper {
position: relative;
width: 500px;
height: 500px;
}
#outer {
position:absolute;
z-index: 100;
width: 500px;
height: 500px;
background: red;
}
#text {
background: blue;
height: 100%;
width: 100%;
}
Jsfiddle
http://jsfiddle.net/mJUzr/
source
share