JSFiddle - React, Tailwind, and code Playground
by mobidevelop
HTML
<br /> <button class="green">Some Button</button>
<br /> <button class="red">Some Button</button>
CSS
body {
background-color: #EEE;
}
button {
font-size: 1.5em;
border-top-width: 1px;
border-left-width: 1px;
border-right-width: 1px;
border-bottom-width: 4px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
box-shadow: 0px 2px 0px rgba(0,0,0,0.25);
padding: 5px;
text-shadow: 0px -1px 0px #000;
transition: border-top-width 0.1s;
-moz-transition: border-top-width 0.1s, border-bottom-width 0.1s, background-color 0.1s; /* Firefox 4 */
-webkit-transition: border-top-width 0.1s, border-bottom-width 0.1s, background-color 0.1s; /* Safari and Chrome */
-o-transition: border-top-width 0.1s, border-bottom-width 0.1s, background-color 0.1s; /* Opera */
}
button:active {
border-top-width: 3px;
border-bottom-width: 2px;
border-top-color: #222;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px
box-shadow: 0px 2px 0px rgba(0,0,0,0.10);
/* margin-top: 0px; */
transition: border-top-width 0.1s;
-moz-transition: border-top-width 0.1s, border-bottom-width 0.1s, background-color 0.1s; /* Firefox 4 */
-webkit-transition: border-top-width 0.1s, border-bottom-width 0.1s, background-color 0.1s; /* Safari and Chrome */
-o-transition: border-top-width 0.1s, border-bottom-width 0.1s, background-color 0.1s; /* Opera */
}
button:focus {
outline: 0;
}
button.green {
background-color: #060;
border-color: #030;
color: #FFF;
}
button.green:focus {
background-color: #0B0;
}
button.green:hover {
background-color: #080;
}
button.green:active {
background-color: #070;
}
button.red {
background-color: #900;
border-color: #600;
color: #FFF;
}
button.red:focus {
background-color: #B00;
}
button.red:hover {
background-color: #B00;
}
button.red:active {
background-color: #800;
}