Created
April 8, 2012 12:46
-
-
Save sakamies/2337109 to your computer and use it in GitHub Desktop.
Transparent 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
/* Transparent Tabs */ | |
.tabs { | |
list-style: none; | |
padding: 0; | |
overflow: hidden; | |
} | |
.tab { | |
display: block; | |
float: left; | |
padding: 10px; | |
} | |
.tab.active { | |
position: relative; | |
border: 2px solid rgba(0,0,0,.2); | |
border-bottom: none; | |
border-radius: 4px 4px 0px 0px; | |
} | |
.tab.active::after, | |
.tab.active::before { | |
display: block; | |
content: ''; | |
position: absolute; | |
bottom: 0; | |
height: 0px; | |
width: 999em; | |
border-bottom: 2px solid rgba(0,0,0,.2); | |
pointer-events: none; | |
} | |
.tab.active::before { | |
right: 100%; | |
margin-right: 2px; | |
} | |
.tab.active::after { | |
left: 100%; | |
margin-left: 2px; | |
} | |
/* clearfix */ | |
/* striped background */ | |
body { | |
font-family: sans-serif; | |
background: hsl(70, 100%, 40%); | |
background-image: linear-gradient(45deg, hsla(0, 100%, 100%, .2) 25%, transparent 25%, transparent 50%, hsla(0, 100%, 100%, .2) 50%, hsla(0, 100%, 100%, .2) 75%, transparent 75%, transparent); | |
background-size: 50px 50px; | |
color: rgba(0,0,0,.6) | |
} | |
a { | |
color: inherit; | |
text-decoration: none; | |
} |
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
<h1>Transparent Tabs</h1> | |
<ul class="tabs"> | |
<li><a class="tab" href="#">Tab 1</a></li> | |
<li><a class="active tab" href="#">Tab 2</a></li> | |
<li><a class="tab" href="#">Tab 3</a></li> | |
<li><a class="tab" href="#">Tab 4</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":"separate","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment