intro with button
by milenig
HTML
<div class="wrapper">
<h1>
Hello there!
</h1>
</div>
<div class="welcome-section">
<div class="content-wrap">
<ul class="fly-in-text">
<li>I</li>
<li>N</li>
<li>T</li>
<li>R</li>
<li>O</li>
<li>😊</li>
</ul>
<a href="#" class="enter-button">ENTER</a>
</div>
</div>
CSS
* {
margin: 0;
padding: 0;
}
body {
font-family: Quicksand;
font-weight: 700;
background-color:#f8f8ff;
}
.wrapper {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.welcome-section {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
background: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/242518/escheresque_ste.png');
overflow: hidden;
}
.content-wrap {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.fly-in-text {
list-style: none;
}
.fly-in-text li {
display: inline-block;
margin-right: 10px;
font-size: 20px;
color: #fff;
opacity: 1;
transition: all 3s ease;
}
.enter-button {
display: block;
text-align: center;
font-size: 15px;
text-decoration: none;
color: #adff2f;
opacity: 1;
margin-top: 20px;
transition: all 1s ease 3s;
}
JavaScript
$(function() {
var welcomeSection = $('.welcome-section'),
enterButton = welcomeSection.find('.enter-button');
setTimeout(function() {
welcomeSection.removeClass('content-hidden');
}, 800);
enterButton.on('click', function(e) {
e.preventDefault();
welcomeSection.addClass('content-hidden').fadeOut();
});
});