[html]
<a href="#" class="btn btn_reg" data-open-window="registration">
<div class="btn__content">Sign-Up</div>
</a>
<style>
body {
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
height: 100vh;
font-family: tahoma;
background-color: rgb(60, 60, 60);
}
/* btn */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
text-decoration: none;
text-align: center;
color: white;
font-family: var(--font-main);
font-weight: 700;
font-size: 1.5rem;
line-height: 14px;
letter-spacing: 0;
padding: 5px 10px;
min-height: 60px;
cursor: pointer;
transition: 0.2s all;
flex-shrink: 0;
text-shadow: none;
text-transform: uppercase;
box-shadow: none;
position: relative;
z-index: 0;
border: 0;
outline: 0;
background-color: transparent;
border-radius: 0;
width: 240px;
}
.btn:before,
.btn:after {
content: "";
display: block;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: -1;
background: linear-gradient(
90deg,
#e21d5a 0%,
#ff3300 40%,
#ffa800 65%,
#e21d5a 100%
);
background-size: 300% 300%;
border: 0;
border-radius: 0;
transition: 0.3s all;
clip-path: polygon(
0 0,
calc(100% - 10px) 0,
100% 10px,
100% 100%,
10px 100%,
0 calc(100% - 10px)
);
}
.btn:hover:before {
transition: 0.3s all;
background-position: 100% 100%;
clip-path: polygon(
0 0,
calc(100% - 20px) 0,
100% 20px,
100% 100%,
20px 100%,
0 calc(100% - 20px)
);
}
.btn:after {
content: "";
display: block;
position: absolute;
top: -5px;
right: -5px;
bottom: -5px;
left: -5px;
z-index: -2;
opacity: 0.3;
}
.btn:hover:after {
transition: 0.3s all;
background-position: 100% 100%;
clip-path: polygon(
0 0,
calc(100% - 20px) 0,
100% 20px,
100% 100%,
20px 100%,
0 calc(100% - 20px)
);
}
.btn__content {
position: relative;
z-index: 5;
display: inline-block;
flex-grow: 1;
min-width: 0;
}
</style>
[/html]
HTML:
<a href="#" class="btn btn_reg" data-open-window="registration">
<div class="btn__content">Sign-Up</div>
</a>
CSS:
body {
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
height: 100vh;
font-family: tahoma;
background-color: rgb(60, 60, 60);
}
/* btn */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
text-decoration: none;
text-align: center;
color: white;
font-family: var(--font-main);
font-weight: 700;
font-size: 1.5rem;
line-height: 14px;
letter-spacing: 0;
padding: 5px 10px;
min-height: 60px;
cursor: pointer;
transition: 0.2s all;
flex-shrink: 0;
text-shadow: none;
text-transform: uppercase;
box-shadow: none;
position: relative;
z-index: 0;
border: 0;
outline: 0;
background-color: transparent;
border-radius: 0;
width: 240px;
}
.btn:before,
.btn:after {
content: "";
display: block;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: -1;
background: linear-gradient(
90deg,
#e21d5a 0%,
#ff3300 40%,
#ffa800 65%,
#e21d5a 100%
);
background-size: 300% 300%;
border: 0;
border-radius: 0;
transition: 0.3s all;
clip-path: polygon(
0 0,
calc(100% - 10px) 0,
100% 10px,
100% 100%,
10px 100%,
0 calc(100% - 10px)
);
}
.btn:hover:before {
transition: 0.3s all;
background-position: 100% 100%;
clip-path: polygon(
0 0,
calc(100% - 20px) 0,
100% 20px,
100% 100%,
20px 100%,
0 calc(100% - 20px)
);
}
.btn:after {
content: "";
display: block;
position: absolute;
top: -5px;
right: -5px;
bottom: -5px;
left: -5px;
z-index: -2;
opacity: 0.3;
}
.btn:hover:after {
transition: 0.3s all;
background-position: 100% 100%;
clip-path: polygon(
0 0,
calc(100% - 20px) 0,
100% 20px,
100% 100%,
20px 100%,
0 calc(100% - 20px)
);
}
.btn__content {
position: relative;
z-index: 5;
display: inline-block;
flex-grow: 1;
min-width: 0;
}
- Подпись автора