Add fade in effect for lazy-loaded images
This commit is contained in:
parent
961ebb545b
commit
bea170cff0
1 changed files with 9 additions and 0 deletions
|
@ -375,9 +375,18 @@ footer {
|
|||
}
|
||||
}
|
||||
|
||||
@keyframes fade-in {
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
}
|
||||
|
||||
img[data-src] {
|
||||
margin: 0.5rem 0;
|
||||
|
||||
&[data-loaded=true] {
|
||||
animation: fade-in linear .5s;
|
||||
}
|
||||
|
||||
&.left {
|
||||
float: left;
|
||||
margin: 0.75rem 1rem 1rem 0;
|
||||
|
|
Loading…
Reference in a new issue