Created
June 27, 2012 00:08
-
-
Save chrisjacob/3000352 to your computer and use it in GitHub Desktop.
A web page created at CodePen.io
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Minimal Circular 3D Buttons · CodePen</title> | |
<style> | |
.screen-reader-text { | |
position: absolute; | |
top: -9999px; | |
left: -9999px; | |
} | |
@font-face { | |
font-family: 'fontello'; | |
src: url('http://css-tricks.com/examples/RoundButtons/fonts/fontello.eot'); | |
src: url('http://css-tricks.com/examples/RoundButtons/fonts/fontello.eot?#iefix') format('embedded-opentype'), | |
url('http://css-tricks.com/examples/RoundButtons/fonts/fontello.woff') format('woff'), | |
url('http://css-tricks.com/examples/RoundButtons/fonts/fontello.ttf') format('truetype'), | |
url('http://css-tricks.com/examples/RoundButtons/fonts/fontello.svg#fontello') format('svg'); | |
font-weight: normal; font-style: normal; | |
} | |
[class*="icon-"] { | |
font-family: 'fontello'; | |
font-style: normal; | |
font-size: 3em; | |
speak: none; | |
} | |
.icon-home:after { content: "\2302"; } | |
.icon-cog:after { content: "\2699"; } | |
.icon-cw:after { content: "\27f3"; } | |
.icon-location:after { content: "\e724"; } | |
* { | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
box-sizing: border-box; | |
margin: 0; | |
padding: 0; | |
} | |
html { | |
background: #f7f7f7 url(http://css-tricks.com/examples/RoundButtons/images/bg.png) repeat center top; | |
} | |
.nav { | |
list-style: none; | |
text-align: center; | |
} | |
.nav li { | |
position: relative; | |
display: inline-block; | |
margin-right: -4px; | |
} | |
.nav li:before { | |
content: ""; | |
display: block; | |
border-top: 1px solid #ddd; | |
border-bottom: 1px solid #fff; | |
width: 100%; | |
height: 1px; | |
position: absolute; | |
top: 50%; | |
z-index: -1; | |
} | |
.nav a:link, .nav a:visited { | |
display: block; | |
text-decoration: none; | |
background-color: #f7f7f7; | |
background-image: -webkit-gradient(linear, left top, left bottom, from(#f7f7f7), to(#e7e7e7)); | |
background-image: -webkit-linear-gradient(top, #f7f7f7, #e7e7e7); | |
background-image: -moz-linear-gradient(top, #f7f7f7, #e7e7e7); | |
background-image: -ms-linear-gradient(top, #f7f7f7, #e7e7e7); | |
background-image: -o-linear-gradient(top, #f7f7f7, #e7e7e7); | |
color: #a7a7a7; | |
margin: 36px; | |
width: 144px; | |
height: 144px; | |
position: relative; | |
text-align: center; | |
line-height: 144px; | |
border-radius: 50%; | |
box-shadow: 0px 3px 8px #aaa, inset 0px 2px 3px #fff; | |
border: solid 1px transparent; | |
} | |
.nav a:before { | |
content: ""; | |
display: block; | |
background: #fff; | |
border-top: 2px solid #ddd; | |
position: absolute; | |
top: -18px; | |
left: -18px; | |
bottom: -18px; | |
right: -18px; | |
z-index: -1; | |
border-radius: 50%; | |
box-shadow: inset 0px 8px 48px #ddd; | |
} | |
.nav a:active { | |
box-shadow: none; | |
border: solid 1px #a7a7a7; | |
} | |
.nav a:hover { | |
text-decoration: none; | |
color: #555; | |
background: #f5f5f5; | |
} | |
</style> | |
<style> | |
#codepen-footer, #codepen-footer * { | |
-webkit-box-sizing: border-box !important; | |
-moz-box-sizing: border-box !important; | |
box-sizing: border-box !important; | |
} | |
#codepen-footer { | |
display: block !important; | |
position: fixed !important; | |
bottom: 0 !important; | |
left: 0 !important; | |
width: 100% !important; | |
padding: 0 10px !important; | |
margin: 0 !important; | |
height: 30px !important; | |
line-height: 30px !important; | |
font-size: 12px !important; | |
color: #eeeeee !important; | |
background-color: #505050 !important; | |
text-align: left !important; | |
background: -webkit-linear-gradient(top, #505050, #383838) !important; | |
background: -moz-linear-gradient(top, #505050, #383838) !important; | |
background: -ms-linear-gradient(top, #505050, #383838) !important; | |
background: -o-linear-gradient(top, #505050, #383838) !important; | |
border-top: 1px solid black !important; | |
border-bottom: 1px solid black !important; | |
border-radius: 0 !important; | |
box-shadow: inset 0 1px 0 #6e6e6e, 0 2px 2px rgba(0, 0, 0, 0.4) !important; | |
z-index: 300 !important; | |
font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, sans-serif !important; | |
letter-spacing: 0 !important; | |
word-spacing: 0 !important; | |
} | |
#codepen-footer a { | |
color: #a7a7a7 !important; | |
text-decoration: none !important; | |
} | |
#codepen-footer a:hover { | |
color: white !important; | |
} | |
</style> | |
<script> | |
// Kill alerts, confirmations and prompts | |
window.alert = function(){}; | |
window.confirm = function(){}; | |
window.prompt = function(){}; | |
window.open = function(){}; | |
window.print = function(){}; | |
</script> | |
</head> | |
<body> | |
<nav> | |
<ul class="nav"> | |
<li> | |
<a href="#"> | |
<span class="icon-home"></span> | |
<span class="screen-reader-text">Home</span> | |
</a> | |
</li> | |
<li> | |
<a href="#"> | |
<span class="icon-cog"></span> | |
<span class="screen-reader-text">Settings</span> | |
</a></li> | |
<li> | |
<a href="#"> | |
<span class="icon-cw"></span> | |
<span class="screen-reader-text">Refresh</span> | |
</a> | |
</li> | |
<li> | |
<a href="#"> | |
<span class="icon-location"></span> | |
<span class="screen-reader-text">Location</span> | |
</a> | |
</li> | |
</ul> | |
</nav> | |
<script> | |
(function() { | |
/* | |
From this article: | |
http://css-tricks.com/circular-3d-buttons/ | |
*/ | |
})(); | |
</script> | |
<div id="codepen-footer"> | |
<a style="color: #f73535 !important;" href="https://codepen.wufoo.com/forms/m7x3r3/def/field14=" onclick="window.open(this.href, null, 'height=517, width=680, toolbar=0, location=0, status=1, scrollbars=1, resizable=1'); return false">Report Abuse</a> | |
| |
<a href="/chriscoyier/pen/46/3">Edit this Pen</a> | |
</div> | |
</body> | |
</html> |
This file contains 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
/* | |
From this article: | |
http://css-tricks.com/circular-3d-buttons/ | |
*/ |
This file contains 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> | |
<ul class="nav"> | |
<li> | |
<a href="#"> | |
<span class="icon-home"></span> | |
<span class="screen-reader-text">Home</span> | |
</a> | |
</li> | |
<li> | |
<a href="#"> | |
<span class="icon-cog"></span> | |
<span class="screen-reader-text">Settings</span> | |
</a></li> | |
<li> | |
<a href="#"> | |
<span class="icon-cw"></span> | |
<span class="screen-reader-text">Refresh</span> | |
</a> | |
</li> | |
<li> | |
<a href="#"> | |
<span class="icon-location"></span> | |
<span class="screen-reader-text">Location</span> | |
</a> | |
</li> | |
</ul> | |
</nav> |
This file contains 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
.screen-reader-text { | |
position: absolute; | |
top: -9999px; | |
left: -9999px; | |
} | |
@font-face { | |
font-family: 'fontello'; | |
src: url('http://css-tricks.com/examples/RoundButtons/fonts/fontello.eot'); | |
src: url('http://css-tricks.com/examples/RoundButtons/fonts/fontello.eot?#iefix') format('embedded-opentype'), | |
url('http://css-tricks.com/examples/RoundButtons/fonts/fontello.woff') format('woff'), | |
url('http://css-tricks.com/examples/RoundButtons/fonts/fontello.ttf') format('truetype'), | |
url('http://css-tricks.com/examples/RoundButtons/fonts/fontello.svg#fontello') format('svg'); | |
font-weight: normal; font-style: normal; | |
} | |
[class*="icon-"] { | |
font-family: 'fontello'; | |
font-style: normal; | |
font-size: 3em; | |
speak: none; | |
} | |
.icon-home:after { content: "\2302"; } | |
.icon-cog:after { content: "\2699"; } | |
.icon-cw:after { content: "\27f3"; } | |
.icon-location:after { content: "\e724"; } | |
* { | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
box-sizing: border-box; | |
margin: 0; | |
padding: 0; | |
} | |
html { | |
background: #f7f7f7 url(http://css-tricks.com/examples/RoundButtons/images/bg.png) repeat center top; | |
} | |
.nav { | |
list-style: none; | |
text-align: center; | |
} | |
.nav li { | |
position: relative; | |
display: inline-block; | |
margin-right: -4px; | |
} | |
.nav li:before { | |
content: ""; | |
display: block; | |
border-top: 1px solid #ddd; | |
border-bottom: 1px solid #fff; | |
width: 100%; | |
height: 1px; | |
position: absolute; | |
top: 50%; | |
z-index: -1; | |
} | |
.nav a:link, .nav a:visited { | |
display: block; | |
text-decoration: none; | |
background-color: #f7f7f7; | |
background-image: -webkit-gradient(linear, left top, left bottom, from(#f7f7f7), to(#e7e7e7)); | |
background-image: -webkit-linear-gradient(top, #f7f7f7, #e7e7e7); | |
background-image: -moz-linear-gradient(top, #f7f7f7, #e7e7e7); | |
background-image: -ms-linear-gradient(top, #f7f7f7, #e7e7e7); | |
background-image: -o-linear-gradient(top, #f7f7f7, #e7e7e7); | |
color: #a7a7a7; | |
margin: 36px; | |
width: 144px; | |
height: 144px; | |
position: relative; | |
text-align: center; | |
line-height: 144px; | |
border-radius: 50%; | |
box-shadow: 0px 3px 8px #aaa, inset 0px 2px 3px #fff; | |
border: solid 1px transparent; | |
} | |
.nav a:before { | |
content: ""; | |
display: block; | |
background: #fff; | |
border-top: 2px solid #ddd; | |
position: absolute; | |
top: -18px; | |
left: -18px; | |
bottom: -18px; | |
right: -18px; | |
z-index: -1; | |
border-radius: 50%; | |
box-shadow: inset 0px 8px 48px #ddd; | |
} | |
.nav a:active { | |
box-shadow: none; | |
border: solid 1px #a7a7a7; | |
} | |
.nav a:hover { | |
text-decoration: none; | |
color: #555; | |
background: #f5f5f5; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment