add images in css code example
Example 1: how to add an image in css
.element {
background-image: url("imageFile.png");
}
Example 2: adding animation to images css
basic animation drop
//drop is variable named for the animation
@keyframes drop {
0% {
opacity: 0;
transform: translateY(-80px);
}
100% {
opacity: 1;
transform: translateY(0px);
}
}
img {
animation: drop 500ms ease;
}