
Originally Posted by
pookeyblow
This page have the exact effect I'm after (just click on the menu): http://www.hyperkit.co.uk
Would anyone be kind enough to tell how they did this?
Usually we do not reverse engineer or otherwise reveal other's code. But this is so basic as to reasonably be considered ordinary HTML, CSS, and jQuery javascript.
The html:
HTML Code:
<body>
<div id="overlay-preload"><span>Welcome</span></div>
Initial styles:
Code:
#overlay-preload {
background: #f44805;
background: rgba(244,72,5,0.6);
height: 100%;
width: 100%;
position: fixed;
z-index: 999999;
color: #ffffff;
font-size: 72px;
text-align: center;
}
#overlay-preload span {
position: relative;
display: block;
top: 50%;
margin-top: -70px;
}
Uses jQuery 1.8.3, so the scripting required is:
Code:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<script type="text/javascript">
// Overlay fade out on load
$(window).load(function(i) {
$('#overlay-preload').delay(5000).fadeOut('slow');
});
</script>
This is an old thread, so I'm closing it. If anyone has further questions, please start a new thread. You may refer back to this one if you like.
Bookmarks