galaxy/Buttons/Dashrath-Sharma_cowardly-dingo-27.html

78 lines
1.4 KiB
HTML

<button class="btn">
Button
</button>
<style>
/* From Uiverse.io by Dashrath-Sharma - Tags: button */
.btn {
border-right: 1px solid #ff758f;
border-bottom: 1px solid #ff758f;
border-top: 1px solid transparent;
border-left: 1px solid transparent;
outline: none;
background: #f8f9fa;
font-size: 17px;
padding: 1em 2em;
border-radius: .5em;
position: relative;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
transition: all .5s;
z-index: 1;
}
.btn:hover {
color: #212529;
border-right: 1px solid transparent;
border-bottom: 1px solid transparent;
border-top: 1px solid #ff758f;
border-left: 1px solid #ff758f;
box-shadow: 1px 1px 0 #f8f9fa,
2px 2px 0 #e9ecef,
3px 3px 0 #fff0f3,
4px 4px 0 #ffb3c1,
5px 5px 0 #ff4d6d,
6px 6px 0 #6c757d,
7px 7px 0 #a4133c,
8px 8px 0 #800f2f,
9px 9px 0 #212529;
}
.btn:active {
transition: 0s;
transform: scale(.93);
}
.btn::before,
.btn::after {
left: 0;
content: '';
position: absolute;
background: #ffccd5;
z-index: -1;
}
.btn::before {
width: 0;
height: 10%;
transition: width .5s;
}
.btn:hover::before {
width: 100%;
}
.btn::after {
width: 100%;
height: 0;
border-radius: 100%;
transition: all .5s .2s;
}
.btn:hover::after {
height: 100%;
border-radius: 0;
}
</style>