Hover Animated Change Button Text #168
CSS Hover animated change button text
Adding these style CSS buttons to your website is easier than you think. Simply copy and paste the CSS code provided with each button design into your stylesheet
Preview Button Style
You can view the default style of buttons, the disabled state mode style of buttons, and the full-width block style of the button here. Some buttons style may not display in full width format
Button Source Code HTML and CSS
Click the button below to download the source code or edit it live.
To copy this click on the icon at the top right of the code box
<button class="btn-168">
<span class="text-one">Button 168</span>
<span class="text-two">Back</span>
</button>
.btn-168 {
width: 140px;
height: 50px;
background-image: radial-gradient(circle at bottom center, #57e8f5, #2a72d5);
color: #fff;
border-radius: 20px;
border: none;
outline: none;
position: relative;
box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
overflow: hidden;
font-family: Arial, Helvetica, sans-serif;
cursor: pointer;
text-decoration: none;
user-select: none;
display: inline-flex;
justify-content: center;
align-items: center;
font-size: 18px;
font-weight: bold;
text-shadow: 1px 1px 0 #464646;
/*** full width block ***/
/* width: 100%; */
}
.btn-168 span {
transition: top 0.5s;
text-align: center;
}
.btn-168 .text-one {
position: absolute;
width: 100%;
top: 50%;
left: 0;
transform: translateY(-50%);
}
.btn-168 .text-two {
position: absolute;
width: 100%;
top: 150%;
left: 0;
transform: translateY(-50%);
}
.btn-168:hover .text-one {
top: -100%;
}
.btn-168:hover .text-two {
top: 50%;
}
/*** disabled style ***/
.btn-168:disabled {
pointer-events: none;
opacity: .65;
color: #7e7e7e;
background: #dcdcdc;
box-shadow: none;
text-shadow: none;
}