Created
January 10, 2012 19:55
-
-
Save TomMalbran/1590824 to your computer and use it in GitHub Desktop.
Nice Tabs
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
/** | |
* Nice Tabs | |
*/ | |
.tabrow { | |
position: relative; | |
text-align: center; | |
list-style: none; | |
margin: 0; | |
padding: 0; | |
line-height: 24px; | |
overflow: hidden; | |
top: 40px; | |
} | |
.tabrow:after { | |
position: absolute; | |
content: ""; | |
width: 100%; | |
bottom: 0; | |
left: 0; | |
border-bottom: 1px solid #AAA; | |
z-index: 1; | |
} | |
.tabrow li { | |
position: relative; | |
display: inline-block; | |
margin: 0 8px; | |
padding: 0 13px; | |
border: 1px solid #AAA; | |
border-width: 1px 0px 1px 0px; | |
background-color: #ECECEC; | |
background-image: linear-gradient(to bottom, #ECECEC 50%, #D1D1D1 100%); | |
box-shadow: inset 0 1px 0 #FFF; | |
font-family: Georgia, Times, "Times New Roman", serif; | |
text-transform: uppercase; | |
font-weight: bold; | |
font-size: 10px; | |
letter-spacing: 1px; | |
text-shadow: 0 1px #FFF; | |
z-index: 0; | |
} | |
.tabrow li.selected { | |
background: #FFF; | |
color: #000; | |
z-index: 2; | |
border-bottom-color: #FFF; | |
} | |
.tabrow a { | |
color: #555; | |
text-decoration: none; | |
} | |
.tabrow li:before, | |
.tabrow li:after { | |
position: absolute; | |
bottom: -1px; | |
width: 15px; | |
height: 24px; | |
content: " "; | |
border: 1px solid #AAA; | |
background: linear-gradient(to bottom, #ECECEC 50%, #D1D1D1 100%); | |
z-index: 3; | |
} | |
.tabrow li:before { | |
left: -10px; | |
border-right: none; | |
border-top-left-radius: 6px; | |
transform: skew(-20deg); | |
box-shadow: -2px 0px 2px rgba(0, 0, 0, 0.1), inset 0 1px 0 #FFF; | |
} | |
.tabrow li:after { | |
right: -10px; | |
border-left: none; | |
border-top-right-radius: 6px; | |
transform: skew(20deg); | |
box-shadow: 2px 0px 3px rgba(0, 0, 0, 0.1), inset 0 1px 0 #FFF; | |
} | |
.tabrow li.selected:before, | |
.tabrow li.selected:after { | |
background: #FFF; | |
border-bottom-color: #FFF; | |
} | |
.tabrow li a:before, | |
.tabrow li a:after { | |
position: absolute; | |
bottom: -1px; | |
width: 6px; | |
height: 6px; | |
content: " "; | |
border: 1px solid #AAA; | |
z-index: 4; | |
} | |
.tabrow li a:before { | |
left: -19px; | |
border-bottom-right-radius: 6px; | |
border-width: 0 1px 1px 0; | |
box-shadow: 2px 2px 0 #D1D1D1; | |
transform: skew(-20deg); | |
} | |
.tabrow li a:after { | |
right: -19px; | |
border-bottom-left-radius: 6px; | |
border-width: 0 0 1px 1px; | |
box-shadow: -2px 2px 0 #D1D1D1; | |
transform: skew(20deg); | |
} | |
.tabrow li.selected a:before { | |
box-shadow: 2px 2px 0 #FFF; | |
} | |
.tabrow li.selected a:after { | |
box-shadow: -2px 2px 0 #FFF; | |
} |
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
<ul class="tabrow"> | |
<li><a href="#">Lorem</a></li> | |
<li><a href="#">Ipsum</a></li> | |
<li class="selected"><a href="#">Sit amet</a></li> | |
<li><a href="#">Consectetur adipisicing</a></li> | |
</ul> |
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
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment