image shake animation before revealing scrollbox
HTML
<style>
.containerr0 {
position: relative;
width:100%;
}
.imager0 /*image*/ {
display: block;
width: 150px;
height: 150px;
border: 1px solid black;
border-radius: 8px;
}
.overlayr0 {
position: absolute;
bottom: 100%;
left: 0;
right: 0;
top: 0;
background: rgb(255, 229, 251);
background: radial-gradient(circle, rgba(255, 229, 251, 1) 0%, rgba(255, 148, 190, 1) 50%);
overflow-x: hidden;
overflow-y: scroll;
width: 150px; /* the container width */
height: 0;
transition: 0.8s;
-moz-transition: 0.8s;
-webkit-transition: 0.8s;
-o-transition: 0.8s;
}
.containerr0:hover .overlayr0 {
animation: shakeit 1s, image_blur 1s;
transition: all 1s ease-in-out;
transition-timing-function: cubic-bezier(0.1, 0.8, 0.9, 0.1);
bottom: 0;
top: 0;
height: 150px; /* height of container */
border: 1px solid black;
border-radius: 8px;
}
.textr0 {
color: black;
font-family: 'Kosugi Maru', sans-serif;
font-size: .5rem;
text-align: left;
overflow-x: hidden;
overflow-y: scroll;
width: 130px; /* width of scrollable text, make this smaller */
height: 150px; /* height of scrollable text */
padding: 10px;
line-height: 1.2em;
letter-spacing: -0.05;
}
@keyframes shakeit {
0% {
transform: translate(1px, 1px) rotate(0deg);
}
10% {
transform: translate(-1px, -2px) rotate(-1deg);
}
20% {
transform: translate(-3px, 0px) rotate(1deg);
}
30% {
transform: translate(3px, 2px) rotate(0deg);
}
40% {
transform: translate(1px, -1px) rotate(1deg);
}
50% {
transform: translate(-1px, 2px) rotate(-1deg);
}
60% {
transform: translate(-3px, 1px) rotate(0deg);
}
70% {
transform: translate(3px, 1px) rotate(-1deg);
}
80% {
transform: translate(-1px, -1px) rotate(1deg);
}
90% {
transform:...