JSFiddle - React, Tailwind, and code Playground
by lollero
HTML
<div id="nav" class="wrap">
<div class="inner-wrap">
<img src="https://developer.github.com/assets/images/logo_developer.png" alt="">
<ul>
<li><a href="#">API</a></li>
<li><a href="#">Developers</a></li>
<li><a href="#">Blog</a></li>
<li><a href="#">Support</a></li>
</ul>
</div>
</div>
<div id="header" class="wrap">
<div class="inner-wrap">
<div class="left">
<h1>Leverage the power of GitHub in your app.</h1>
<p>
Get started with one of our guides, or jump straight into the API documentation.
</p>
</div>
<div class="right">
<img src="https://developer.github.com/assets/images/rocketship.png" alt="">
</div>
</div>
</div>
<div id="midsection" class="wrap">
<div class="inner-wrap">
<h2>
<span>Join the GitHub Developer Program.</span>
<a href="#" class="btn">Find out more!</a>
</h2>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsam, facere exercitationem accusantium? Deserunt nobis reprehenderit assumenda beatae nihil laudantium, recusandae veniam. Aspernatur, unde vero quod.
</p>
</div>
</div>
CSS
html, body {
background: #fff;
font-family: "Helvetica Neue", sans-serif;
margin: 0px;
padding: 0px;
}
.wrap {
width: 100%;
float: left; clear: both;
}
.inner-wrap {
margin: 0 auto;
max-width: 1100px;
padding: 0 30px;
}
#nav {
/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#ffffff+0,f5f5f5+100 */
background: #ffffff; /* Old browsers */
background: -moz-linear-gradient(top, #ffffff 0%, #f5f5f5 100%); /* FF3.6-15 */
background: -webkit-linear-gradient(top, #ffffff 0%,#f5f5f5 100%); /* Chrome10-25,Safari5.1-6 */
background: linear-gradient(to bottom, #ffffff 0%,#f5f5f5 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f5f5f5',GradientType=0 ); /* IE6-9 */
}
#nav img {
margin: 15px 0;
}
#nav ul,
#nav li {
list-style: none;
margin: 0px;
padding: 0px;
}
#nav ul {
float: right;
margin-top: 15px;
}
#nav li {
float: left;
}
#nav li a {
display: block;
padding: 5px;
color: #222;
text-decoration: none;
font-weight: bold;
-webkit-transition: color 0.3s ease;
transition: color 0.3s ease;
}
#nav li a:hover {
color: #a8a5bd;
}
#header { margin: 20px; 0; }
#header .left,
#header .right {
float: left;
width: 37%;
}
#header .right {
float: right;
width: 61%;
}
#header h1 {
font-size: 42px;
line-height: 47px;
font-weight: 300;
}
#header p {
font-size: 19px;
line-height: 22px;
color: #777;
}
#header .right img {
float: right;
max-width: 100%;
opacity: 0.7;
-webkit-transition opacity 0.3s ease-out;
transition: opacity 0.3s ease-out;
}
#header .right img:hover {
opacity: 1;
}
#midsection {
background: #160625;
}
#midsection .inner-wrap {
padding: 30px;
}
#midsection h2 {
margin: 0px;
color: #fff;
}
#midsection h2 .btn {
font-size: 14px;
vertical-align: middle;
margin-left: 20px;
}
#midsection p {
color: #a7a4bc;
display: none;
margin:...
JavaScript
var n = 0;
$('#midsection h2 a').on("click", function() {
var parentNext = $(this).parent().next(),
toggle = n === 0 ? 'show' : 'hide';
parentNext.stop()[ toggle ]( 300 );
n = n > 0 ? 0 : ++n;
});