This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="image-container" data-large="https://assets.imgix.net/unsplash/bear.jpg?w=1000"> | |
<img class="placeholder" src="https://assets.imgix.net/unsplash/bear.jpg?w=50" class="img-small"> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.image-container { | |
position: relative; | |
overflow: hidden; | |
} | |
.placeholder { | |
position: relative; | |
width: 100%; | |
filter: blur(10px); | |
transform: scale(1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.onload = function() { | |
var largePicture = document.querySelector('.image-container') | |
// Load large image | |
var imgLarge = new Image(); | |
imgLarge.src = largePicture.dataset.large; | |
imgLarge.onload = function () { | |
imgLarge.classList.add('loaded'); | |
}; | |
imgLarge.classList.add('picture'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"editor.tokenColorCustomizations": { | |
"textMateRules": [ | |
{ | |
"name": "Comment", | |
"scope": [ | |
"comment", | |
"punctuation.definition.comment" | |
], | |
"settings": { | |
"fontStyle": "italic", |
OlderNewer