@nichoth/image
Version:
An image component
41 lines (35 loc) • 584 B
CSS
.placeholder {
display: inline-block;
min-width: 50px;
min-height: 50px;
background-color: #f6f6f6;
background-size: cover;
background-repeat: no-repeat;
position: relative;
overflow: hidden;
}
.placeholder img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
img.sharp {
opacity: 0;
}
img.sharp.loaded {
opacity: 1;
animation: sharpen 0.6s both;
}
.blurry {
filter: blur(30px);
}
@keyframes sharpen {
from {
filter: blur(30px);
}
to {
filter: blur(0px)
}
}