Demo Section
by Chintan Upadhayay
HTML
<svg class="hidden">
<defs>
<path id="tabshape" d="M80,60C34,53.5,64.417,0,0,0v60H80z"/>
</defs>
</svg>
<section>
<div class="tabs tabs-feature-style">
<nav>
<ul>
<li class="tab-current">
<a href="#section-shape-1" data-tab="section-shape-1">
<svg viewBox="0 0 80 60" preserveAspectRatio="none"><use xlink:href="#tabshape"></use></svg>
<span>Home</span>
</a>
</li>
<li>
<a href="#section-shape-2" data-tab="section-shape-2">
<svg viewBox="0 0 80 60" preserveAspectRatio="none"><use xlink:href="#tabshape"></use></svg>
<svg viewBox="0 0 80 60" preserveAspectRatio="none"><use xlink:href="#tabshape"></use></svg>
<span>Design</span>
</a>
</li>
<li>
<a href="#section-shape-3" data-tab="section-shape-3">
<svg viewBox="0 0 80 60" preserveAspectRatio="none"><use xlink:href="#tabshape"></use></svg>
<svg viewBox="0 0 80 60" preserveAspectRatio="none"><use xlink:href="#tabshape"></use></svg>
<span>Work</span>
</a>
</li>
<li>
<a href="#section-shape-4" data-tab="section-shape-4">
<svg viewBox="0 0 80 60" preserveAspectRatio="none"><use xlink:href="#tabshape"></use></svg>
<svg viewBox="0 0 80 60" preserveAspectRatio="none"><use xlink:href="#tabshape"></use></svg>
<span>Portfolio</span>
...
CSS
body {
background: #e7ecea;
color: #74777b;
font-weight: 400;
font-size: 1em;
font-family: 'Raleway', Arial, sans-serif;
}
.tabs {
position: relative;
overflow: hidden;
margin: 0 auto;
width: 100%;
font-weight: 300;
font-size: 1.25em;
}
/* Nav */
.tabs nav {
text-align: center;
}
.tabs nav ul {
position: relative;
display: -ms-flexbox;
display: -webkit-flex;
display: -moz-flex;
display: -ms-flex;
display: flex;
margin: 0 auto;
padding: 0;
max-width: 1200px;
list-style: none;
-ms-box-orient: horizontal;
-ms-box-pack: center;
-webkit-flex-flow: row wrap;
-moz-flex-flow: row wrap;
-ms-flex-flow: row wrap;
flex-flow: row wrap;
-webkit-justify-content: center;
-moz-justify-content: center;
-ms-justify-content: center;
justify-content: center;
}
.tabs nav ul li {
position: relative;
z-index: 1;
display: block;
margin: 0;
text-align: center;
-webkit-flex: 1;
-moz-flex: 1;
-ms-flex: 1;
flex: 1;
}
.tabs nav a {
position: relative;
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
line-height: 2.5;
}
.tabs nav a span {
vertical-align: middle;
font-size: 0.75em;
}
.tabs nav li.tab-current a {
color: #74777b;
}
.tabs nav a:focus {
outline: none;
}
/* Content */
.sh-feature-content-wrap {
position: relative;
}
.sh-feature-content-wrap section {
display: none;
margin: 0 auto;
padding: 1em;
max-width: 1200px;
text-align: center;
}
.sh-feature-content-wrap section.current-feature {
display: block;
}
.sh-feature-content-wrap section p {
margin: 0;
padding: 0.75em 0;
color: #000;
font-weight: 900;
font-size: 4em;
line-height: 1;
}
@media screen and (max-width: 58em) {
.tabs nav a.icon span {
display: none;
}
.tabs nav a:before {
margin-right: 0;
...
JavaScript
$("body").delegate(".tabs-feature-style ul li a", "click", function(e) {
e.preventDefault();
$('.tab-current').removeClass('tab-current');
$(this).parent().addClass('tab-current');
var dataTab = $(this).attr('data-tab');
$('.current-feature').removeClass('current-feature');
$(".sh-feature-content-wrap .sh-feature-content[data-section=" + dataTab + "]").addClass('current-feature');
});