initClub · 1ère Communauté Webflow Francophone

Updated 23 hours ago

Customizing Lightbox Behavior in Webflow

Hello,
Je souhaite custom le comportement des Lightbox - qui nativement dans Webflow semblent afficher l’image en thumbnail en opacité inférieure. Alors que ce devrait être l’inverse (l’image active full opacity)
Suivi un tuto de digidop mais j’arrive pas à lui forcer le .CSS malgré le !important

/* Rendre l'image active plus visible */
.w-lightbox-img w-lightbox-wide w-lightbox-thumbnail-image {
    filter: none !important; /* Supprime l'effet de gris */
    opacity: 1 !important;
}

/* Assombrir les images non actives */
.w-lightbox-img w-lightbox-wide w-lightbox-thumbnail-image {
    filter: brightness(0.5) !important; /* Réduit la luminosité */
    opacity: 0.5 !important; /* Rend les autres images un peu plus transparentes */
}

Any idea?

Attachment
Screenshot 2025-03-13 at 17.53.11.png
S
1 comment

Hello @Yué Yin,

Dans ton css, les classes suivantes doivent aussi avoir un point devant leur nom.

/* Rendre l'image active plus visible */
.w-lightbox-img .w-lightbox-wide .w-lightbox-thumbnail-image {
    filter: none !important; /* Supprime l'effet de gris */
    opacity: 1 !important;
}

/* Assombrir les images non actives */
.w-lightbox-img .w-lightbox-wide .w-lightbox-thumbnail-image {
    filter: brightness(0.5) !important; /* Réduit la luminosité */
    opacity: 0.5 !important; /* Rend les autres images un peu plus transparentes */
}

Add a reply
Sign up and join the conversation on Slack