/* まずはお決まりのボックスサイズ算出をborer-boxに */
/* すべてのボタンデザインに共通しているわけではありません。不必要なものは消してください。 */
*,
*:before,
*:after {
-webkit-box-sizing: inherit;
box-sizing: inherit;
}
html {
-webkit-box-sizing: border-box;
box-sizing: border-box;
font-size: 62.5%;/*rem算出をしやすくするために*/
}
.btn,
a.btn,
button.btn {
font-size: 1.6rem;
font-weight: 700;
line-height: 1.5;
position: relative;
display: inline-block;
padding: 1rem 4rem;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-transition: all 0.3s;
transition: all 0.3s;
text-align: center;
vertical-align: middle;
text-decoration: none;
letter-spacing: 0.1em;
color: #212529;
border-radius: 0.5rem;
}
HTML
<a href="" class="btn btn--orange btn--circle btn--circle-a btn--shadow">PUSH!</a>
CSS
a.btn--orange {
color: #fff;
background-color: #eb6100;
}
a.btn--orange:hover {
color: #fff;
background: #f56500;
}
a.btn--shadow {
-webkit-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
}
a.btn--circle {
border-radius: 50%;
line-height: 100px;
width: 100px;
height: 100px;
padding: 0;
}
HTML
<a href="" class="btn btn--yellow btn--circle">PUSH!</a>
CSS
a.btn--yellow {
color: #000;
background-color: #fff100;
border-bottom: 5px solid #ccc100;
}
a.btn--circle {
border-radius: 50%;
line-height: 100px;
width: 100px;
height: 100px;
padding: 0;
-webkit-box-shadow: 0 5px 0 #e6d900;
box-shadow: 0 5px 0 #e6d900;
}
a.btn--circle:hover {
-webkit-transform: translate(0, 3px);
transform: translate(0, 3px);
-webkit-box-shadow: 0 2px 0 #e6d900;
box-shadow: 0 2px 0 #e6d900;
}