JSFiddle - React, Tailwind, and code Playground
HTML
<div class="wrapper">
<div class="photos">
<div class="photo photo-1"></div>
<div class="photo photo-2"></div>
<div class="photo photo-3"></div>
</div>
</div>
CSS
* {
margin: 0;
padding: 0;
outline: 0;
-webkit-backface-visibility: hidden;
-webkit-text-size-adjust: 100%;
-webkit-appearance: none;
box-sizing: border-box;
}
html {
font-size: 62.5%;
}
html,
body {
height: 100%;
color: #fff;
}
body {
background: #333;
font-size: 1.8rem;
font-family: Arial, sans-serif;
}
a {
text-decoration: none;
}
.hidden {
display: none !important;
}
/* animations
--------------------*/
@keyframes bounceInRight {
0%,
60%,
75%,
90%,
to {
animation-timing-function: cubic-bezier(.215, .61, .355, 1)
}
0% {
opacity: 0;
transform: translateX(3000px) scale(1);
}
60% {
opacity: 1;
transform: translateX(-25px) scale(1);
}
75% {
transform: translateX(10px) scale(1);
}
90% {
transform: translateX(-5px) scale(1);
}
to {
/* transform: none; */
/* transform: translate3d(0, 0, 0) scale(1); */
/* transform: translateX(0) scale(1); */
opacity: 1;
}
/*100% {
transform: ;
opacity: 1;
}*/
}
.wrapper {
text-align: center;
height: 100%;
overflow: hidden;
}
/* top panel for photos
-----------------------------------*/
.photos {
display: inline-block;
}
.photo {
float: left;
background: #c9c9c9;
width: 200px;
height: 300px;
border-radius: 15px;
box-shadow: 0 0 30px #000;
border: solid 7px #fff;
margin-left: -13px;
cursor: pointer;
position: relative;
transition: all .2s ease-in-out;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
opacity: 0;
animation: bounceInRight 1s forwards;
/*animation: animation-name || animation-duration || animation-timing-function || animation-delay || animation-iteration-count || animation-direction || animation-fill-mode || animation-play-state;*/
}
.photo:hover{
z-index: 10;
/* animation: initial; */
/* transform: scale(1.1); */
transform: scale(1.1) !important;
}
.photo-1 {
background-position: 0 0;
animation-delay: 0s;
}
.photo-2...