JSFiddle - React, Tailwind, and code Playground
by niks_on
HTML
<div class="about-rightside__item">
<p class="about-rightside__item__counter">01</p>
<p class="about-rightside__item__text">без переплаты посредникам</p>
</div>
CSS
.about-rightside__item {
width: 320px;
height: 160px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-webkit-box-align: start;
-ms-flex-align: start;
align-items: flex-start;
position: relative;
background-color: rgba(233, 85, 49, 0.1);
-webkit-transition: 1s -webkit-box-shadow;
transition: 1s -webkit-box-shadow;
transition: 1s box-shadow;
transition: 1s box-shadow, 1s -webkit-box-shadow;
border-radius: 75px;
padding-top: 40px;
padding-left: 30px;
padding-bottom: 30px;
margin: 25px;
}
.about-rightside__item :hover {
-webkit-box-shadow: 0 5px 35px 0px rgba(0, 0, 0, 0.1);
box-shadow: 0 5px 35px 0px rgba(0, 0, 0, 0.1);
}
.about-rightside__item :hover ::before, .about-rightside__item :hover ::after {
display: block;
content: '';
position: absolute;
width: 320px;
height: 160px;
background: #FDA8CF;
border-radius: 75px;
z-index: -1;
-webkit-animation: 1s clockwise infinite;
animation: 1s clockwise infinite;
}
.about-rightside__item :hover ::after {
background: #F3CE5E;
-webkit-animation: 2s counterclockwise infinite;
animation: 2s counterclockwise infinite;
}
@-webkit-keyframes clockwise {
0% {
top: -5px;
left: 0;
}
12% {
top: -2px;
left: 2px;
}
25% {
top: 0;
left: 5px;
}
37% {
top: 2px;
left: 2px;
}
50% {
top: 5px;
left: 0;
}
62% {
top: 2px;
left: -2px;
}
75% {
top: 0;
left: -5px;
}
87% {
top: -2px;
left: -2px;
}
100% {
top: -5px;
left: 0;
}
}
@keyframes clockwise {
0% {
top: -5px;
...