Skip to content

Instantly share code, notes, and snippets.

@flunder
Created April 24, 2012 16:44
Show Gist options
  • Save flunder/2481358 to your computer and use it in GitHub Desktop.
Save flunder/2481358 to your computer and use it in GitHub Desktop.
A web page created at CodePen.io
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>Code Pen &middot; 1</title>
<link rel="stylesheet" href="http://codepen.io/stylesheets/css/reset.css">
<style>
body {
background: #eee;
}
button {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
background: -webkit-gradient(linear, left top, left bottom, from(#07a7db), to(white));
background: -moz-linear-gradient(top, #07a7db, white);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#07a7db', endColorstr='white');
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
border: 1px solid #aaa;
padding: 8px 25px;
font-weight: bold;
position: absolute;
left: 50%;
top: 40%;
margin-left: -25px;
font-size: 1em;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
cursor: pointer;
display: block;
color: #222;
font-family: Helvetica,Arial,Verdana;
}
</style>
</head>
<body>
<button>Button →</button>
<script src="http://codepen.io/javascripts/libs/prefixfree.min.js"></script>
</body>
</html>
<button>Button →</button>
@import "compass";
@mixin rounded($radius: 0.5em) {
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
border-radius: $radius;
}
@mixin gradient($from, $to) {
background: -webkit-gradient(linear, left top, left bottom, from($from), to($to));
background: -moz-linear-gradient(top, $from, $to);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$from}', endColorstr='#{$to}');
}
@mixin box-shadow($top, $left, $blur, $color, $inset: false) {
@if $inset {
box-shadow:inset $top $left $blur $color;
} @else {
box-shadow: $top $left $blur $color;
}
}
@mixin inner-boxShadow() {
box-shadow: inset 0 0 5px #ddd;
}
body { background: #eee; }
button {
@include rounded(5px);
@include gradient(#07a7db,#fff);
@include box-shadow(0, 2px, 2px, rgba(0, 0, 0, 0.2));
border: 1px solid #aaa;
padding: 8px 25px;
font-weight: bold;
position: absolute;
left: 50%;
top: 40%;
margin-left: -25px;
font-size: 1em;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
cursor: pointer;
display: block;
color: #222;
font-family:Helvetica,Arial,Verdana;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment