mirror of
https://github.com/uiverse-io/galaxy.git
synced 2025-11-28 13:10:21 +08:00
73 lines
1.4 KiB
HTML
73 lines
1.4 KiB
HTML
<button class="button">
|
|
<span class="span">About us</span>
|
|
<span class="span">Hello!</span>
|
|
</button>
|
|
<style>
|
|
/* From Uiverse.io by gharsh11032000 - Tags: gradient, button, hover effect */
|
|
.button {
|
|
position: relative;
|
|
border: none;
|
|
color: #e8e8e8;
|
|
background: #333333;
|
|
font-weight: 600;
|
|
font-size: 20px;
|
|
text-transform: uppercase;
|
|
height: 60px;
|
|
padding: 10px;
|
|
border-radius: 10px;
|
|
cursor: pointer;
|
|
box-shadow: 0 10px 20px rgba(0, 0, 0,0.2);
|
|
transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.button .span {
|
|
position: relative;
|
|
width: 100%;
|
|
height: 100%;
|
|
padding: 10px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
|
|
transition-delay: 0.6s;
|
|
}
|
|
|
|
.button:hover .span:nth-child(1) {
|
|
transform: translateY(-100%);
|
|
transition-delay: 0s;
|
|
}
|
|
|
|
.button:hover .span:nth-child(2) {
|
|
transform: translateY(-100%);
|
|
transition-delay: 0s;
|
|
}
|
|
|
|
.button:before {
|
|
position: absolute;
|
|
content: "";
|
|
width: 100%;
|
|
height: 100%;
|
|
top: 0;
|
|
left: 0;
|
|
background: linear-gradient(-45deg, #fc00ff 0%, #00dbde 100% );
|
|
transform: scaleX(0);
|
|
transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
|
|
transition-delay: 0;
|
|
transform-origin: left;
|
|
}
|
|
|
|
.button:hover::before {
|
|
transform: scaleX(1);
|
|
transition-delay: 0.6s;
|
|
}
|
|
|
|
.button:active {
|
|
box-shadow: none;
|
|
}
|
|
|
|
|
|
|
|
|
|
</style>
|