Пишем HTML:
Пишем стиль:
Получаем такой результат:
HTML:
<div class="button fire">Fire</div>
<div class="button ice">Ice</div>
CSS:
body {
padding: 0;
margin: 0;
height: 100vh;
background-image: url(https://images.pexels.com/photos/2086917/pexels-photo-2086917.png?auto=compress&cs=tinysrgb&dpr=3&h=750&w=1260);
background-size: cover;
background-position: center center;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.button {
border: 1px solid green;
-webkit-backdrop-filter: blur(10px);
backdrop-filter: blur(10px);
transform: skewX(-10deg);
height: 50px;
width: 200px;
border-radius: 20px 5px 20px 0px;
position: relative;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
font: 15px sans-serif;
font-weight: 300;
text-shadow: 0 0 20px #fff;
text-transform: uppercase;
-webkit-animation: breath2 2s 0.5s infinite alternate;
animation: breath2 2s 0.5s infinite alternate;
transition: all 0.2s ease;
cursor: pointer;
}
.button:before {
content: "";
display: block;
width: calc(100% - 22px);
height: calc(50px - 8px);
-webkit-animation: breath 2s infinite alternate;
animation: breath 2s infinite alternate;
left: 10px;
top: 3px;
position: absolute;
background-color: transparent;
border: 1px solid #fff;
border-radius: 15px 3px 15px 3px;
}
.button.fire {
border-color: #ffeca8;
background-image: linear-gradient(to bottom, rgba(255, 138, 48, 0.6), rgba(240, 96, 29, 0.6));
box-shadow: 0 0 70px rgba(255, 138, 48, 0.6), 0 5px 20px rgba(255, 138, 48, 0.6), inset 0 1px #ffeca8, inset 0 -1px #ffeca8;
color: #ffeca8;
}
.button.fire:before {
box-shadow: inset 0 0 30px 0 #ffeca8;
}
.button.ice {
border-color: #a8ecff;
background-image: linear-gradient(to bottom, rgba(48, 138, 255, 0.5), rgba(29, 96, 240, 0.5));
box-shadow: 0 0 70px rgba(48, 138, 255, 0.5), 0 5px 20px rgba(48, 138, 255, 0.5), inset 0 1px #ffeca8, inset 0 -1px #ffeca8;
color: #a8ecff;
}
.button.ice:before {
box-shadow: inset 0 0 30px 0 #a8ecff;
}
.button:hover.fire {
box-shadow: 0 0 70px rgba(255, 138, 48, 0.8), 0 5px 20px rgba(255, 138, 48, 0.8), inset 0 1px #ffeca8, inset 0 -1px #ffeca8;
}
.button:hover.fire:before {
box-shadow: inset 0 0 50px 0 #ffeca8;
}
.button:hover.ice {
box-shadow: 0 0 70px rgba(48, 138, 255, 0.8), 0 5px 20px rgba(48, 138, 255, 0.8), inset 0 1px #a8ecff, inset 0 -1px #a8ecff;
}
.button:hover.ice:before {
box-shadow: inset 0 0 50px 0 #a8ecff;
}
.button + .button {
margin-top: 15px;
-webkit-animation-delay: 0.3s;
animation-delay: 0.3s;
}
@-webkit-keyframes breath {
0% {
transform: scaleX(1);
}
100% {
transform: scaleX(0.95);
}
}
@keyframes breath {
0% {
transform: scaleX(1);
}
100% {
transform: scaleX(0.95);
}
}
@-webkit-keyframes breath2 {
0% {
transform: skewX(-10deg) scaleX(1);
}
100% {
transform: skewX(-10deg) scaleX(0.95);
}
}
@keyframes breath2 {
0% {
transform: skewX(-10deg) scaleX(1);
}
100% {
transform: skewX(-10deg) scaleX(0.95);
}
}
.ref {
-webkit-backdrop-filter: blur(10px);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.6);
border-radius: 3px;
padding: 5px 8px;
position: absolute;
font-size: 16px;
bottom: 10px;
right: 10px;
color: #fff;
font-weight: 300;
font-family: sans-serif;
text-decoration: none;
}
.ref::first-letter {
font-size: 12px;
}