labo
teste
by olimann
HTML
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css">
<script src="tympanus.net/Development/DialogEffects/js/classie.js"></script>
<script src="tympanus.net/Development/DialogEffects/js/modernizr.custom.js"></script>
<div id="wrapper">
<div id="header">
<button id="trigger-overlay" type="button">Open Overlay</button>
</div>
<!-- MENU OVERLAY -->
<div class="overlay overlay-slidedown">
<a class="overlay-close" type="button"><i class="fi-plus"></i></a>
<!-- menu -->
<nav>
</nav>
</div>
<div id="hero">
<div class="welcome">
<h1>WELCOME!</h1>
</div>
<a class="scroll" href="#content"><i class="fa fa-arrow-down"></i></a>
</div>
<div id="content">
<h2> If nothing goes right for you , go left.</h2>
<p> Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. </p>
</div>
<div id="footer">
<p>footer</p>
</div>
</div>
CSS
body{ margin:0px 0px; background-color: #eee; }
a{ color: #fff; font-size: 2em; }
#header{
position: fixed;
left:0;
top:0;
width:100%;
z-index: 100;
padding: 30px 0;
}
#header nav{
width:80%;
margin:0px auto;
}
#header a{
color: fff;
-webkit-transition: all .3s ease-in;
-moz-transition: all .3s ease-in;
-o-transition: all .3s ease-in;
transition: all .3s ease-in;
}
.active{
color: #000;
}
#header .logo{
float: left;
}
#header .menu{
float: right;
}
.scroll {
position: absolute;
bottom: 0;
left: 0;
width:100%;
margin-bottom: 30px;
text-align:center;
z-index: 200;
}
#hero{
background-image:url(http://www.wallpaperup.com/uploads/wallpapers/2012/12/13/24616/9ced48915b4858b1bfbee2aed03cbda2.jpg);
background-size:cover;
position:relative;
}
.welcome {
position:absolute;
top:50%;
text-align:center;
width:100%;
color:#fff;
font-size:36px;
-ms-transform: translate(0,-50%); /* IE 9 */
-webkit-transform: translate(0,-50%); /* Safari */
transform: translate(0,-50%);
}
#content{
padding:100px 50px;
text-align:center;
width:80%;
margin:0px auto;
min-height: 900px;
}
#content h2{
margin:0px 0px 30px 0px;
font-size: 2em;
}
#content p{
font-size: .9em;
line-height: 2;
}
#footer{
padding:100px 0px;
text-align:center;
background:#ddd;
}
/* Overlay style ///////////////////////////////////////////*/
.overlay {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
background: rgba(0,0,0,.9);
z-index: 200;
}
/* Overlay closing cross */
.overlay .overlay-close {
width: 80px;
height: 80px;
position: absolute;
left: 50%;
top: 20px;
border: none;
outline: none;
z-index: 100;
}
/* Menu style */
.overlay nav {
text-align: center;
position: relative;
top: 50%;
height: 60%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
}
.overlay ul {
list-style: none;
padding:...
JavaScript
jQuery(document).ready(function($){
function fullscreen(){
jQuery('#hero').css({
width: jQuery(window).width(),
height: jQuery(window).height()
});
}
fullscreen();
jQuery(window).resize(function() {
fullscreen();
});
});
////////////////////
//jQuery(document).ready(function($){
// $('a[href^="#"]').on('click',function (e) {
// e.preventDefault();
// var target = this.hash;
// var $target = $(target);
// $('html, body').stop().animate({
// 'scrollTop': $target.offset().top
// }, 500, 'swing', function () {
// window.location.hash = target;
//?
// $('#header a').addClass('active');
// });
// });
//});
///
//$(function() {
// var icons = $("#header a");
// $(window).scroll(function() {
// var scroll = $(window).scrollTop();
// if (scroll >= 600) {
// icons.removeClass('header a').addClass("active");
// } else {
// icons.removeClass("active").addClass('header a');
// }
// });
//});
//change menu button colour
(function() {
var triggerBttn = document.getElementById( 'trigger-overlay' ),
overlay = document.querySelector( 'div.overlay' ),
closeBttn = overlay.querySelector( 'a.overlay-close' );
transEndEventNames = {
'WebkitTransition': 'webkitTransitionEnd',
'MozTransition': 'transitionend',
'OTransition': 'oTransitionEnd',
'msTransition': 'MSTransitionEnd',
'transition': 'transitionend'
},
transEndEventName = transEndEventNames[ Modernizr.prefixed( 'transition' ) ],
support = { transitions : Modernizr.csstransitions };
function toggleOverlay() {
if( classie.has( overlay, 'open' ) ) {
classie.remove( overlay, 'open' );
classie.add( overlay, 'close' );
var onEndTransitionFn = function( ev ) {
if( support.transitions ) {
if( ev.propertyName !== 'visibility' )...