Border Animated Button #68
CSS Border animated button
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
.btn-68 {
position: relative;
border-radius: 5px;
padding: 10px 25px;
overflow: hidden;
background-color: #9c27b0;
font-family: Arial, Helvetica, sans-serif;
box-sizing: border-box;
border: solid 1px #000;
display: inline-flex;
align-items: center;
justify-content: center;
color: #fff;
user-select: none;
cursor: pointer;
text-decoration: none;
}
.btn-68::before {
content: "";
position: absolute;
width: 20px;
height: 170px;
background: linear-gradient(#ffffff, #ffffff);
animation: animation_68 4s linear infinite;
}
.btn-68::after {
content: "";
position: absolute;
inset: 2px;
background-color: #9C27B0;
}
.btn-68 span {
position: relative;
font-size: 1.2rem;
font-weight: bold;
z-index: 1;
display: inline-block;
margin: 0;
}
@keyframes animation_68 {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.btn-68:disabled {
pointer-events: none;
opacity: .65;
color: #7e7e7e;
background: #dcdcdc;
box-shadow: none;
}
.btn-68:disabled::before {
background: transparent;
animation: none;
}
.btn-68:disabled::after {
background: #dcdcdc;
}