<html><body>
<div class="wrap">
<button class="type-1">ボタン1</button>
<button class="type-2">ボタン2</button>
<button class="type-3">ボタン3</button>
</div>
</body></html>
*, *:before, *:after {
box-sizing: border-box;
margin: 0;
padding: 0;
border: 0;
background: transparent;
font-family: "Helvetica Neue", "メイリオ", Meiryo, Helvetica, Arial, "游ゴシック", YuGothic, "ヒラギノ角ゴ ProN W3", "Hiragino Kaku Gothic ProN", "MS Pゴシック", "MS PGothic", sans-serif;
}
html, body {
width: 100%;
height: 100%;
}
.wrap {
display: flex;
height: 100%;
justify-content: center;
align-items: center;
flex-wrap: wrap;
}
button {
}
button{
display: block;
margin: 1em;
padding: .5em 2em;
border-radius: 5px;
transition: 500ms;
font-size: 2em;
cursor: pointer;
outline: none;
}
.type-1 {
background: #222;
color: #fff;
}
.type-1:hover ,
.type-1:focus {
transform: translateY(-1em);
}
.type-2 {
background: #222;
color: #fff;
}
.type-2:hover ,
.type-2:focus {
transform: rotateZ(20deg);
}
.type-3 {
background: #222;
color: #fff;
}
.type-3:hover ,
.type-3:focus {
transform: scale(.8);
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.