Created
December 21, 2011 06:28
-
-
Save dgmid/1504906 to your computer and use it in GitHub Desktop.
Pure CSS3 buttons - Example 1
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
/** | |
* Pure CSS3 buttons - Example 1 | |
*/ | |
/* page styles */ | |
body{ | |
font: 11px/15px 'Lucida Grande', sans-serif; | |
background: #eaeaea url(http://www.midwinter-dg.com/blog_demos/css3-buttons/images/body.gif); | |
width: 1000px; | |
margin: 100px auto; | |
} | |
p { | |
width: 300px; | |
margin: 0 auto; | |
text-align: center; | |
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | |
} | |
a:link, a:visited { | |
color: #555; | |
text-decoration: none; | |
} | |
a:hover, a:active { | |
color: #0080ff; | |
} | |
/* button styles */ | |
div { | |
margin-bottom: 10px; | |
border-radius: 20px; | |
background-clip: padding-box; | |
padding: 30px; | |
text-align: center; | |
position: relative; | |
background: url(http://www.midwinter-dg.com/blog_demos/css3-buttons/images/transparent.png) repeat-x 0 top; | |
} | |
a.transparent:link, a.transparent:visited { | |
color: #fff; | |
padding: 20px 40px; | |
border-style: none; | |
background-color: rgba(0,0,0,0); | |
font: 14px/1 "Lucida Grande", Lucida, Verdana, sans-serif; | |
text-shadow: #000 0 2px 2px; | |
border-radius: 6px; | |
display: inline-block; | |
} | |
a.transparent:hover { | |
box-shadow: rgba(255,255,255,.28) 0px 1px 1px, inset rgba(0,0,0,.5) 0 1px 4px; | |
background-image: linear-gradient(top, rgba(0,0,0,.1) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,.2) 100%); | |
background-clip: padding-box; | |
} | |
a.transparent:active { | |
background: rgba(0,0,0,.3); | |
box-shadow: rgba(255,255,255,.28) 0px 1px 1px, inset rgba(0,0,0,.5) 0 1px 6px; | |
} |
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> | |
<div> | |
<a href="http://www.midwinter-dg.com/permalink-css3-isometric-text-demo-2011-03-14.html" class="transparent" target="_blank">CSS3 Isometric Text</a> | |
<a href="http://www.midwinter-dg.com/downloads.html" class="transparent" target="_blank">Downloads</a> | |
<a href="http://safariextensions.midwinter-dg.com/" class="transparent" target="_blank">Safari Extensions</a> | |
</div> | |
<p>you can find more examples here:<br /> | |
<a href="http://www.midwinter-dg.com/blog_demos/css3-buttons/" target="_blank">Cross Browser Pure CSS3 Buttons</a></p> | |
</body> |
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","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment