gdfh45gdf15g
by Divine Draft
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.19.1/TweenMax.min.js"></script>
<main>
<header id="app-header" class="app-header">
<div class="left-panel">
<div class="large-title-new">HEADER</div>
<div class="header-menu">
<li><a href="">Item menu</a></li>
<li><a href="">Item menu</a></li>
<li><a href="">Item menu</a></li>
</div>
</div>
<div class="block-other">
test
</div>
</header>
<div class="card">
<div class="card-title">Cu mei vide viris gloriatur, at populo eripuit sit</div>
<p>Bacon ipsum dolor amet turducken short ribs strip steak, cupim pastrami kielbasa sirloin doner drumstick pork belly meatloaf swine shank short loin bacon. Pastrami andouille bresaola spare ribs, jerky drumstick jowl kevin ground round bacon. Hamburger filet mignon tongue pancetta ground round strip steak. Biltong boudin swine, pork chop pig tri-tip short loin shank alcatra kielbasa. Picanha fatback jowl, pastrami tri-tip chicken turkey. Spare ribs picanha alcatra kielbasa rump t-bone shankle meatball landjaeger beef doner biltong fatback short ribs salami. Burgdoggen picanha frankfurter, brisket tongue pig beef ribs doner strip steak hamburger.</p>
<p>Capicola tri-tip landjaeger strip steak. Ham boudin pig kielbasa landjaeger prosciutto. Shank short ribs spare ribs ball tip salami alcatra. Prosciutto alcatra jerky flank meatball andouille rump bacon. Short loin shoulder tenderloin bresaola. Bacon pastrami turkey ham drumstick tongue kevin meatloaf spare ribs pork belly. Alcatra meatloaf doner tail bresaola meatball ham hock cow.</p>
<p>Sausage andouille pork chop tri-tip. Ham beef ribs ball tip pork chop picanha biltong. Shoulder rump sirloin meatball ham hock. Flank pancetta ham kielbasa short ribs, leberkas hamburger. Ham hock bresaola ball tip chuck rump pork loin jowl brisket swine tenderloin. Sirloin t-bone jowl ham pork belly leberkas kielbasa.</p>
<p>Tongue...
CSS
* {
box-sizing: border-box;
}
html {
font-size: 62.5%;
line-height: 1.4;
}
html,
body {
height: 100%;
min-height: 100%;
font-family: Roboto, sans-serif;
}
main {
padding-top: 100px;
font-family: arial;
background: #eee;
min-height: 100%;
}
.app-header {
display: block;
background: #3f51b5;
position: fixed;
top: 0;
left: 0;
color: #fff;
height: 150px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0);
}
.header-content {
position: relative;
height: 100%;
width: 100%;
}
.app-toolbar {
display: flex;
flex-direction: row;
align-items: center;
position: relative;
height: 64px;
padding: 0 16px;
pointer-events: none;
font-size: 20px;
}
#large-toolbar {
position: absolute;
top: 50%;
left: 0;
transform: translateY(-50%);
width: 100%;
}
.small-title,
.large-title {
transform-origin: left top;
white-space: nowrap;
flex: 1;
flex-basis: 1e-9px;
overflow: hidden;
font-weight: 400;
line-height: 1.5;
position: relative;
}
.small-title {
margin-left: 14px;
opacity: 0;
}
.large-title {
will-change: transform, opacity;
font-size: 56px;
font-size: 2em;
margin-left: 24px;
}
.card {
padding: 16px;
margin: 24px;
border-radius: 2px;
background-color: #fff;
color: rgba(0, 0, 0, 0.87);
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12),
0 3px 1px -2px rgba(0, 0, 0, 0.2);
}
.card .card-title {
padding: 24px 16px 8px;
font-size: 24px;
font-weight: 400;
line-height: 32px;
}
.card p {
font-size: 1.6rem;
font-weight: 400;
letter-spacing: 0.01em;
line-height: 1.6em;
padding: 0 16px;
}
/* Начинаем */
.app-header {display:flex;justify-content:space-between;align-items:center;width:100%;padding:0 40px;}
.left-panel {display:flex;flex-direction:column;}
.block-other {background:yellow;padding:20px;}
.large-title-new {font-size:40px;}
.header-menu li {display:inline-block;font-size:18px;margin:0 10px;}
.header-menu li:first-child {margin-left:0...
JavaScript
jQuery(function($) {
$(window).scroll(function(){
if($(this).scrollTop()>185){
$('.app-header').addClass('app-header--active');
}
else if ($(this).scrollTop()<185){
$('.app-header').removeClass('app-header--active');
}
});
});