With a big picture
Ok, I'm sorry, this code may be a little scary. But it's not! It's just… long and a bit exhaustive.
In short: the "3D" effect is practicly the same as on the buttons in
Firefox Addons website, with a not-blurred inset box-shadow ; the
glowing effect is achieved with a ::before pseudo-element
with a white-to-transparent gradient. That's all
.gb {
display: inline-block;
vertical-align:bottom;
text-decoration: none;
-moz-text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
color: #000;
min-width:5em;
width:auto;
max-width:90%;
line-height: 2em;
text-align: center;
border: none;
-moz-border-radius : .5em;
border-radius : .5em;
margin:.5em;
padding: 1em;
position: relative;
z-index:1;
-moz-box-shadow: 0 10px 10px rgba(0, 0, 0, .1), 0 -4px rgba(0, 0, 0, 0.1) inset, 0 -4px 1px 1px rgba(255,255,255,0.2) inset;
box-shadow: 0 10px 10px rgba(128, 128, 128, .1), 0 -4px rgba(0, 0, 0, 0.1) inset, 0 -4px 1px 1px rgba(255,255,255,0.2) inset;
overflow: hidden;
-moz-transition: box-shadow 0.2s linear;
-webkit-transition: box-shadow 0.2s linear;
-o-transition: box-shadow 0.2s linear;
-ms-transition: box-shadow 0.2s linear;
transition: box-shadow 0.2s linear;
-moz-box-sizing : border-box;
-webkit-box-sizing: border-box;
box-sizing : border-box;
background: #d5d5d5;
}
.gb:hover,
.gb:focus {
-moz-box-shadow: 0 2px 10px rgba(0, 0, 0, .1), 0 -4px rgba(0, 0, 0, 0.1) inset, 0 -4px 1px 1px rgba(255,255,255,0.2) inset;
box-shadow: 0 2px 10px rgba(0, 0, 0, .1), 0 -4px rgba(0, 0, 0, 0.1) inset, 0 -4px 1px 1px rgba(255,255,255,0.2) inset;
}
.gb:active {
-moz-box-shadow: 0 0px 5px rgba(0, 0, 0, .1), 0 -4px rgba(0, 0, 0, 0.1) inset, 0 -4px 1px 1px rgba(255,255,255,0.2) inset;
box-shadow: 0 0px 5px rgba(0, 0, 0, .1), 0 -4px rgba(0, 0, 0, 0.1) inset, 0 -4px 1px 1px rgba(255,255,255,0.2) inset;
}
.gb::after {
content:"";
color : #ddd;
-moz-text-shadow: -1px -1px 1px rgba(0,0,0,0.5);
text-shadow: -1px -1px 1px rgba(0,0,0,0.5);
position:absolute;
left:1px;
right:1px;
top:1px;
bottom:50%;
-moz-border-bottom-left-radius: 6px;
-moz-border-bottom-right-radius: 6px;
-moz-border-top-left-radius: inherit;
-moz-border-top-right-radius: inherit;
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
border-top-left-radius: inherit;
border-top-right-radius: inherit;
z-index : 10;
background: -moz-linear-gradient(top, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.2) 100%); /*FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0.8)), color-stop(100%,rgba(255,255,255,0.2))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(255,255,255,0.8) 0%,rgba(255,255,255,0.2) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(255,255,255,0.8) 0%,rgba(255,255,255,0.2) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(255,255,255,0.8) 0%,rgba(255,255,255,0.2) 100%); /* IE10+ */
background: linear-gradient(top, rgba(255,255,255,0.8) 0%,rgba(255,255,255,0.2) 100%); /* W3C */
-moz-transition: background 0.2s linear;
-webkit-transition: background 0.2s linear;
-o-transition: background 0.2s linear;
-ms-transition: background 0.2s linear;
transition: background 0.2s linear;
}
.gb:hover::after,
.gb:focus::after {
background: -moz-linear-gradient(top, rgba(255,255,255,0.75) 0%, rgba(255,255,255,0.2) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0.75)), color-stop(100%,rgba(255,255,255,0.2))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(255,255,255,0.75) 0%,rgba(255,255,255,0.2) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(255,255,255,0.75) 0%,rgba(255,255,255,0.2) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(255,255,255,0.75) 0%,rgba(255,255,255,0.2) 100%); /* IE10+ */
background: linear-gradient(top, rgba(255,255,255,0.75) 0%,rgba(255,255,255,0.2) 100%); /* W3C */
}
If you want to have just a picture inside without padding, you can, but…

…the inset box-shadow is behind the picture (it's a normal behaviour,
because box-shadow is behind the element, and behind the content
of the element). You can see it with a transparent picture:

If you apply the class to an input…
…no glowing, because input doesn't accept
::after pseudo-elements - nor does img and all void elements.