Image Modal

Blume

Skript Quelle

In diesem Beispiel verwenden wir CSS, um ein modales (Dialogfeld) zu erstellen, das standardmäßig ausgeblendet ist.
Wir verwenden JavaScript, um das Modal auszulösen und das aktuelle Bild im Modal anzuzeigen, wenn darauf geklickt wird. Beachten Sie auch, dass wir den Wert aus dem "alt" -Attribut des Bildes als Bildbeschriftungstext innerhalb des Modals verwenden.


In this example, we use CSS to create a modal (dialog box) that is hidden by default.
We use JavaScript to trigger the modal and to display the current image inside the modal when it is clicked on. Also note that we use the value from the image's "alt" attribute as an image caption text inside the modal.


Diese Webseite wurde kostenlos mit Homepage-Baukasten.de erstellt. Willst du auch eine eigene Webseite?
Gratis anmelden