Sommaire
1
Le script
Utiliser un LLM pour résumer ou expliquer ce script
1
Le script
Ajouter le script sur la page ou le projet Webflow
<script src="https://cdn.jsdelivr.net/npm/medium-zoom@1.0.3/dist/medium-zoom.min.js"></script>
<script>
const images = Array.from(document.querySelectorAll(".post-wrapper img"));
if ($(window).width() >= 991) {
images.forEach(img => {
mediumZoom(img, {
margin: 0, /* The space outside the zoomed image */
background: "#fff", /* The background of the overlay */
scrollOffset: 40, /* The number of pixels to scroll to close the zoom */
});
});
}
</script>2
Les attributes
Nom
Valeur
Nom
Valeur
Nom
Valeur
Nom
Valeur
Nom
Valeur
Nom
Valeur
Nom
Valeur
3
Tuto
4
Template
5
Code source du script
<script src="https://cdn.jsdelivr.net/npm/medium-zoom@1.0.3/dist/medium-zoom.min.js"></script>
<script>
const images = Array.from(document.querySelectorAll(".post-wrapper img"));
if ($(window).width() >= 991) {
images.forEach(img => {
mediumZoom(img, {
margin: 0, /* The space outside the zoomed image */
background: "#fff", /* The background of the overlay */
scrollOffset: 40, /* The number of pixels to scroll to close the zoom */
});
});
}
</script>