<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div class="menuWrapper">
<div class="menuFloat">
<div class="menuLeft">
<div class="menuLeftLogo">Logo</div>
<a href="#" class="menuitem">Menu Item 1</a>
<a href="#" class="menuitem">Menu Item 2</a>
<a href="#" class="menuitem">Menu Item 3</a>
</div>
<div class="menuRight">
</div>
</div>
</div>
<!-- carousel -->
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
</ol>
<!-- SLIDES -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="http://lorempixel.com/output/abstract-q-c-1322-993-7.jpg" alt="">
<div class="carousel-caption"> </div>
</div>
<div class="item">
<img src="http://lorempixel.com/output/abstract-q-c-1322-1180-8.jpg" alt="">
<div class="carousel-caption"> </div>
</div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span><span class="sr-only">Anterior</span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span><span class="sr-only">Siguiente</span>
</a>
</div>
<div class="pageWrapper">
<div class="pageContent">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in
<br><br>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in
<br><br>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in
<br><br>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in
<br><br>
</div>
</div>
@import url(http://fonts.googleapis.com/css?family=Open+Sans);
@import url(http://fonts.googleapis.com/css?family=Bree+Serif);
body {
background: #FFF;
margin: 0px;
font-family: 'Open Sans', sans-serif;
}
.menuWrapper {
height: 100px;
line-height: 100px;
position: fixed;
width: 100%;
background: #EFEFEF;
z-index: 1000;
top: 0;
-webkit-box-shadow: 0px 0px 60px -16px rgba(0,0,0,0.75);
-moz-box-shadow: 0px 0px 60px -16px rgba(0,0,0,0.75);
box-shadow: 0px 0px 60px -16px rgba(0,0,0,0.75);
transition: 0.5s;
}
.menuFloat {
width: 100%;
}
.menuWrapperShrink {
height: 50px;
line-height: 50px;
transition: 0.5s;
}
.menuLeft {
display: inline-flex;
}
.menuLeftLogo {
display: block;
background: none;
line-height: inherit;
font-size: 50px;
padding: 0px 30px;
text-align: center;
transition: font-size 1.0s;
font-family: 'Bree Serif', 'serif';
}
.menuLeftLogoShrink {
font-size: 30px;
transition: font-size 1.0s;
}
.menuRight {
display: inline-flex;
height: inherit;
flex-direction: row;
background: none;
float: right;
}
.menuitem {
display: inline-block;
background: #DDD;
float: right;
text-align: center;
margin-left: 2px;
line-height: inherit;
height: inherit;
width: 200px;
font-size: 17px;
color: #777;
text-decoration: none;
transition: background 0.3s;
}
.menuitem:hover {
text-decoration: none;
background: #009CEF;
color: #FFF;
transition: background 0.3s;
}
.carousel {
position: fixed;
top: 90px;
z-index: 100;
transition: 0.3s;
}
.carouselShrink {
position: fixed;
top: 50px;
z-index: 100;
transition: 0.3s;
}
.slide{
min-width: 100%;
height: 310px;
}
.item img {
min-width: 100%;
height: 100px;
}
.pageWrapper {
position: relative;
width: 100%;
background: #FFF;
z-index: 100;
top: 400px;
}
.pageContent {
width: 70%;
margin-left: auto;
margin-right: auto;
padding: 30px 0px;
}
$(document).ready(function(){
var off = $('.menuWrapper').offset().top;
$(window).on('scroll', function(){
if( $(window).scrollTop() > 0 ){
$('.menuWrapper').addClass('menuWrapperShrink');
$('.menuLeftLogo').addClass('menuLeftLogoShrink');
$('.carousel').addClass('carouselShrink');
}else{
$('.menuWrapper').removeClass('menuWrapperShrink');
$('.menuLeftLogo').removeClass('menuLeftLogoShrink');
$('.carousel').removeClass('carouselShrink');
}
});
});