mirror of
https://github.com/uiverse-io/galaxy.git
synced 2025-11-28 05:00:22 +08:00
59 lines
1.1 KiB
HTML
59 lines
1.1 KiB
HTML
<button class="animated-button">
|
|
<span>Hover me</span>
|
|
<span></span>
|
|
</button>
|
|
|
|
<style>
|
|
/* From Uiverse.io by gharsh11032000 - Tags: button, hover effect */
|
|
.animated-button {
|
|
position: relative;
|
|
display: inline-block;
|
|
padding: 12px 24px;
|
|
border: none;
|
|
font-size: 16px;
|
|
background-color: inherit;
|
|
border-radius: 100px;
|
|
font-weight: 600;
|
|
color: #ffffff40;
|
|
box-shadow: 0 0 0 2px #ffffff20;
|
|
cursor: pointer;
|
|
overflow: hidden;
|
|
transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
|
|
}
|
|
|
|
.animated-button span:last-child {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
width: 20px;
|
|
height: 20px;
|
|
background-color: #2196F3;
|
|
border-radius: 50%;
|
|
opacity: 0;
|
|
transition: all 0.8s cubic-bezier(0.23, 1, 0.320, 1);
|
|
}
|
|
|
|
.animated-button span:first-child {
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
.animated-button:hover {
|
|
box-shadow: 0 0 0 5px #2195f360;
|
|
color: #ffffff;
|
|
}
|
|
|
|
.animated-button:active {
|
|
scale: 0.95;
|
|
}
|
|
|
|
.animated-button:hover span:last-child {
|
|
width: 150px;
|
|
height: 150px;
|
|
opacity: 1;
|
|
}
|
|
|
|
|
|
|
|
</style>
|