<section>
<button class="button1">フワッ</button>
<button class="button2">シュインッ</button>
<button class="button3">ブオン</button>
<button class="button4">ファッ</button>
<div class="button5-wrapper">
<button class="button5">ジュワッ</button>
</div>
</section>
* {
font-family: "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN W3", Meiryo;
text-decoration: none;
outline: none;
}
$font1: #fff;
$color1: #3a3a4d;
$color2: #7f7f8f;
$color3: #e35583;
$base: #484860;
[class^="button"] {
&:hover {
cursor: pointer;
}
}
.button1 {
font-size: 21px;
color: $font1;
line-height: 1;
padding: 15px 30px;
background-color: $color1;
border: 1px solid $color1;
transition: all .2s linear;
&:hover {
border-color: $font1;
background-color: transparent;
}
}
.button2 {
font-size: 21px;
color: $font1;
line-height: 1;
padding: 15px 30px;
background-color: transparent;
border: none;
position: relative;
transition: all .2s linear;
&:before, &:after {
content: "";
display: block;
width: 0;
height: 0;
position: absolute;
border-color: transparent;
transition: all .2s linear;
z-index: 2;
box-sizing: border-box;
}
&:before {
top: 0;
left: 0;
border-top: 1px solid transparent;
border-left: 1px solid transparent;
}
&:after {
bottom: 0;
right: 0;
border-bottom: 1px solid transparent;
border-right: 1px solid transparent;
}
&:hover {
color: $color2;
&:before, &:after {
border-color: $color2;
width: 100%;
height: 100%;
transition: width .2s linear, height .2s linear;
}
}
}
.button3 {
font-size: 21px;
color: $font1;
line-height: 1;
padding: 15px 30px;
background-color: transparent;
border: none;
transition: all .3s linear;
&:hover {
text-shadow:
0px 0px 30px $color3,
0px 0px 18px $color3,
0px 0px 18px $color3;
}
}
.button4 {
font-size: 21px;
color: $font1;
line-height: 1;
padding: 15px 30px;
background-color: $color1;
border: none;
outline: 2px solid;
outline-color: rgba($color1, 1.0);
outline-offset: 0px;
transition: none;
&:hover {
transition: all .4s ease-out;
box-shadow: 0 0 20px rgba($color1, .7);
outline-color: rgba($color2, 0);
outline-offset: 15px;
}
}
.button5-wrapper {
margin-top: 30px;
width: 100%;
.button5 {
width: 100%;
font-size: 21px;
color: $font1;
line-height: 1;
padding: 15px 30px;
background-color: transparent;
border: 1px solid $font1;
transition: all .2s linear;
&:hover {
background-color: rgba($color2, .3);
}
}
}
html,body {
margin: 0;
width: 100vw;
min-width: 580px;
height: 100vh;
position: relative;
background-color: $base;
}
section {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
position: absolute;
top: 50%;
left: 50%;
width: 600px;
transform: translate(-50%, -50%);
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.