I would use jquery for the animation part, but I'm not sure why you will use this animation with history.back (). The following solution eliminates many additional css.
HTML:
<div id="showme" style="display:none;">
<p>I'm showing</p>
<p><a href="#" id="close">Close</a></p>
</div>
<div id="wrapper">
<a id="show" href="#">Show</a>
</div>
JS:
$('#close').on('click', function(event) {
event.preventDefault();
$('#showme').fadeOut('slow');
});
$('#show').on('click', function(event) {
event.preventDefault();
$('#showme').fadeIn('slow');
});
CSS
body {margin: 0;}
display: block;
position: fixed;
width: 100%; height: 100%;
top: 0; left; 0;
background: lightblue;
}
script: http://jsfiddle.net/cmqg7cyf/4/
source
share