<button class="gradient-btn">
<span>SOME TEXT</span>
</button>
.gradient-btn {
display: inline-block;
position: relative;
border: none;
background: transparent;
padding: 15px 30px;
}
/* Background */
.gradient-btn::before {
content: '';
display: block;
position: absolute;
z-index: 2;
left: 0;
top: 0;
width: 100%;
height: 100%;
border-radius: 16px;
background: linear-gradient(0deg, rgba(11,36,255,1) 0%, rgba(255,0,254,1) 100%);
}
/* Border */
.gradient-btn::after {
content: '';
display: block;
position: absolute;
z-index: 2;
left: 2px;
top: 2px;
width: calc(100% - 4px);
height: calc(100% - 4px);
border-radius: 15px;
background: linear-gradient(0deg, rgba(0,0,0,1) 0%, rgba(74,74,74,1) 100%);
}
.gradient-btn span {
position: relative;
display: inline-block;
z-index: 3;
color: #fff;
font-weight: 700;
font-size: 30px;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.