JSFiddle - React, Tailwind, and code Playground

by lukemartin

HTML

<div class="header-wrap">
    <header>
        <h1>Luke.is</h1>
        
        <nav>
            <ul>
                <li>Home</li>
                <li>About</li>
                <li>Blog</li>
                <li>Contact</li>
            </ul>
        </nav>
    </header>
</div>
<div id="content"></div>

CSS

@font-face {
    font-family: "LeagueGothicRegular";
    src: url("http://luke.is/themes/site_themes/lukeis/fonts/League_Gothic-webfont.eot"), url("http://luke.is/themes/site_themes/lukeis/fonts/League_Gothic-webfont.woff") format("woff"), url("http://luke.is/themes/site_themes/lukeis/fonts/League_Gothic-webfont.ttf") format("truetype"), url("http://luke.is/themes/site_themes/lukeis/fonts/League_Gothic-webfont.svg") format("svg");
}

.header-wrap {
    min-height: 300px;
}

header {
    background: white;
    margin: 0 auto;
    width: 880px;
    padding-top: 60px;
}


nav {
    float: right;
    padding-top: 50px;
    -webkit-transition: all 0.15s ease-in;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

nav ul li {
    color: #929da2;
    cursor: pointer;
    float: left;
    font-family: "LeagueGothicRegular";
    font-size: 1.8em;
    text-transform: uppercase;
    margin-left: 15px;
    -webkit-transition: color 0.15s ease-in;
}

nav ul li:hover {
    color: #82a289;
}

h1 {
    color: #929da2;
    cursor: pointer;
    float: left;
    font-family: "LeagueGothicRegular";
    font-size: 6em;
    text-transform: uppercase;
    -webkit-transition: color 0.15s ease-in;
}

h1:hover {
    color: #82a289;
}

div#content {
    background: #929da2;
    height: 1300px;
}
div#content:before {
    content: " ";
    display: block;
    background: red;
    height: 15px;
    width: 100%;
    /* bg */
    background-size: 30px 30px;
    background: -webkit-linear-gradient(45deg, transparent 25%, transparent 25%, transparent 75%, #929da2 75%, #aaadaf 77%, #c2c3c3 78%, #d1d2d2 79%, #dedede 80%, #e6e6e6 81%, white 81%, white),
        -webkit-linear-gradient(-45deg, white, white 19%, #e6e6e6 19%, #dedede 20%, #d1d2d2 21%, #c2c3c3 22%, #aaadaf 23%, #929da2 25%, transparent 25%, transparent 75%, transparent),
        -webkit-linear-gradient(45deg, white 25%, transparent 25%, transparent 75%, white 75%, white),
        -webkit-linear-gradient(-45deg,...

JavaScript

//$(window).scrollTop(500);

$(window).scroll(function() {
    if(window.pageYOffset > 200) {
        $("header").addClass("x");    
    } else {
        $("header").removeClass("x");
    }
});