forked from daviddarnes/css-buttons
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbutton.css
More file actions
140 lines (140 loc) · 5.02 KB
/
button.css
File metadata and controls
140 lines (140 loc) · 5.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
/*
* Name: CSS Button
* Author: David Darnes
* Author url: http://david.darn.es
* Tools: Made in Coda, Codekit and Less
* Usage: Just copy this file into your work folder and use a less @import
in your main less file. To change the colour either change the colour
referenced next to @button-colour or duplicate the whole class and
create as many colours as you like.
*/
/* This all the button structure and workings, doesn't need to be duplicated */
.button {
font: 16px Georgia, serif;
color: #fff;
position: relative;
float: left;
margin: 58px;
height: 80px;
width: 80px;
-webkit-border-radius: 10000px;
-moz-border-radius: 10000px;
border-radius: 10000px;
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
-ms-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
-webkit-transform-origin: 50% 100%;
-moz-transform-origin: 50% 100%;
-ms-transform-origin: 50% 100%;
-o-transform-origin: 50% 100%;
transform-origin: 50% 100%;
}
.button:hover {
-webkit-transform: scale(1.1);
-moz-transform: scale(1.1);
-ms-transform: scale(1.1);
-o-transform: scale(1.1);
transform: scale(1.1);
}
.button:active {
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
transform: scale(1);
}
.button:after {
content: "::";
letter-spacing: 3px;
position: absolute;
color: #fff;
font-size: 2.25em;
line-height: 40%;
height: 30%;
width: 30%;
left: 34%;
top: 35%;
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
-ms-backface-visibility: hidden;
}
.button:before {
content: "";
display: block;
position: absolute;
height: 71%;
width: 70%;
border-radius: 100%;
top: 15.5%;
left: 15.5%;
}
.button span {
padding: 10%;
display: block;
position: absolute;
width: 80%;
bottom: 110%;
font: 11px 'Helvetica Neue', Helvetica, Arial, sans-serif;
text-align: center;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
opacity: 0;
filter: alpha(opacity=0);
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
-ms-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
.button span:after {
display: block;
content: "";
position: absolute;
bottom: -5px;
left: 50%;
margin-left: -5px;
border-color: transparent;
border-style: solid;
border-width: 5px 5px 0;
}
.button:hover span {
opacity: 0.8;
filter: alpha(opacity=80);
}
/* Regular CSS users can either change all the colours manually (which might take forever) or use the style.css file and reference the colour you want */
.button {
background: #333333;
border-top: 1px solid #666666;
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 1px 1px rgba(51, 51, 51, 0.30000000000000004), inset 0 2px 5px #808080, inset 0 -2px 5px #000000, inset 0 -1px 2px rgba(51, 51, 51, 0.9);
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 1px 1px rgba(51, 51, 51, 0.30000000000000004), inset 0 2px 5px #808080, inset 0 -2px 5px #000000, inset 0 -1px 2px rgba(51, 51, 51, 0.9);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 1px 1px rgba(51, 51, 51, 0.30000000000000004), inset 0 2px 5px #808080, inset 0 -2px 5px #000000, inset 0 -1px 2px rgba(51, 51, 51, 0.9);
}
.button:hover {
-webkit-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3), 0 1px 1px rgba(51, 51, 51, 0.30000000000000004), inset 0 2px 5px #808080, inset 0 -2px 5px #000000, inset 0 -1px 2px rgba(51, 51, 51, 0.9);
-moz-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3), 0 1px 1px rgba(51, 51, 51, 0.30000000000000004), inset 0 2px 5px #808080, inset 0 -2px 5px #000000, inset 0 -1px 2px rgba(51, 51, 51, 0.9);
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3), 0 1px 1px rgba(51, 51, 51, 0.30000000000000004), inset 0 2px 5px #808080, inset 0 -2px 5px #000000, inset 0 -1px 2px rgba(51, 51, 51, 0.9);
}
.button:active {
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 1px 1px rgba(51, 51, 51, 0.30000000000000004), inset 0 2px 5px #808080, inset 0 -2px 5px #000000, inset 0 -1px 2px rgba(51, 51, 51, 0.9);
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 1px 1px rgba(51, 51, 51, 0.30000000000000004), inset 0 2px 5px #808080, inset 0 -2px 5px #000000, inset 0 -1px 2px rgba(51, 51, 51, 0.9);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 1px 1px rgba(51, 51, 51, 0.30000000000000004), inset 0 2px 5px #808080, inset 0 -2px 5px #000000, inset 0 -1px 2px rgba(51, 51, 51, 0.9);
}
.button:after {
text-shadow: 0 -1px 1px #000000, 0 1px 1px #b3b3b3;
}
.button:before {
background: #2b2b2b;
-webkit-box-shadow: 0 2px 5px #737373, 0 -2px 5px #000000, inset 0 -3px 3px #262626, inset 0 1px 2px #262626;
-moz-box-shadow: 0 2px 5px #737373, 0 -2px 5px #000000, inset 0 -3px 3px #262626, inset 0 1px 2px #262626;
box-shadow: 0 2px 5px #737373, 0 -2px 5px #000000, inset 0 -3px 3px #262626, inset 0 1px 2px #262626;
}
.button span {
background: #000000;
text-shadow: 0 1px 0 #000000;
}
.button span:after {
border-top-color: #000000;
}