Created
January 14, 2016 15:43
-
-
Save aolko/209207ef87ad7b2ede5d to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<nav id="tabs"> | |
<div class="tab active"> | |
<span>Tab 1</span> | |
</div> | |
<div class="tab"> | |
<span>Tab 2</span> | |
</div> | |
</nav> | |
<div id="page"> | |
Lorem Ipsum dolor sit amet ... | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.4.20) | |
// Compass (v1.0.3) | |
// ---- | |
body { | |
background-color: #000; | |
margin: 0; | |
padding: 0; | |
font-family: sans-serif; | |
font-size: 16px; | |
} | |
.tab { | |
height: 50px; | |
width: 150px; | |
//border-radius: 15px 15px 0px 0px; | |
background-color: #FFF; | |
position: relative; | |
top: 10px; | |
left: 30px; | |
display: inline-block; | |
z-index: 2; | |
//margin-left:5px; | |
&.active{ | |
&:before { | |
background-color: white; | |
} | |
&:after { | |
background-color: white; | |
} | |
} | |
&:before { | |
height: 50px; | |
width: 30px; | |
//border-radius: 10px 10px 0px 0px; | |
content: ""; | |
position: absolute; | |
left: -15px; | |
top: 0px; | |
-webkit-transform: skewX(-30deg); | |
transform: skewX(-30deg); | |
z-index: -1; | |
} | |
&:after { | |
height: 50px; | |
width: 30px; | |
//border-radius: 10px 10px 0px 0px; | |
content: ""; | |
position: absolute; | |
left: 135px; | |
top: 0px; | |
-webkit-transform: skewX(-30deg); | |
transform: skewX(-30deg); | |
z-index: -1; | |
} | |
&:nth-of-type(2) { | |
background-color: #555; | |
top: 10px; | |
left: 56px; | |
z-index: 1; | |
color: #EEE; | |
&:before { | |
background-color: #555; | |
} | |
&:after { | |
background-color: #555; | |
} | |
&:hover { | |
background-color: #159; | |
transition: 0.3s ease-out; | |
&:before { | |
background-color: #159; | |
transition: 0.3s ease-out; | |
} | |
&:after { | |
background-color: #159; | |
transition: 0.3s ease-out; | |
} | |
} | |
} | |
} | |
.tabs:last-child{ | |
-webkit-transform: skewX(0deg); | |
transform: skewX(0deg); | |
} | |
span { | |
display: inline-block; | |
width: 150px; | |
text-align: center; | |
height: 50px; | |
line-height: 50px; | |
z-index: 3; | |
} | |
#page { | |
background-color: white; | |
height: calc(100vh - 120px); | |
width: calc(100vw - 61px); | |
position: relative; | |
top: 10px; | |
left: 1px; | |
padding: 30px; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
background-color: #000; | |
margin: 0; | |
padding: 0; | |
font-family: sans-serif; | |
font-size: 16px; | |
} | |
.tab { | |
height: 50px; | |
width: 150px; | |
background-color: #FFF; | |
position: relative; | |
top: 10px; | |
left: 30px; | |
display: inline-block; | |
z-index: 2; | |
} | |
.tab.active:before { | |
background-color: white; | |
} | |
.tab.active:after { | |
background-color: white; | |
} | |
.tab:before { | |
height: 50px; | |
width: 30px; | |
content: ""; | |
position: absolute; | |
left: -15px; | |
top: 0px; | |
-webkit-transform: skewX(-30deg); | |
transform: skewX(-30deg); | |
z-index: -1; | |
} | |
.tab:after { | |
height: 50px; | |
width: 30px; | |
content: ""; | |
position: absolute; | |
left: 135px; | |
top: 0px; | |
-webkit-transform: skewX(-30deg); | |
transform: skewX(-30deg); | |
z-index: -1; | |
} | |
.tab:nth-of-type(2) { | |
background-color: #555; | |
top: 10px; | |
left: 56px; | |
z-index: 1; | |
color: #EEE; | |
} | |
.tab:nth-of-type(2):before { | |
background-color: #555; | |
} | |
.tab:nth-of-type(2):after { | |
background-color: #555; | |
} | |
.tab:nth-of-type(2):hover { | |
background-color: #159; | |
transition: 0.3s ease-out; | |
} | |
.tab:nth-of-type(2):hover:before { | |
background-color: #159; | |
transition: 0.3s ease-out; | |
} | |
.tab:nth-of-type(2):hover:after { | |
background-color: #159; | |
transition: 0.3s ease-out; | |
} | |
.tabs:last-child { | |
-webkit-transform: skewX(0deg); | |
transform: skewX(0deg); | |
} | |
span { | |
display: inline-block; | |
width: 150px; | |
text-align: center; | |
height: 50px; | |
line-height: 50px; | |
z-index: 3; | |
} | |
#page { | |
background-color: white; | |
height: calc(100vh - 120px); | |
width: calc(100vw - 61px); | |
position: relative; | |
top: 10px; | |
left: 1px; | |
padding: 30px; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<nav id="tabs"> | |
<div class="tab active"> | |
<span>Tab 1</span> | |
</div> | |
<div class="tab"> | |
<span>Tab 2</span> | |
</div> | |
</nav> | |
<div id="page"> | |
Lorem Ipsum dolor sit amet ... | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment