diff options
| author | Eltrac <hi@guhub.cn> | 2025-09-16 15:24:34 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-09-16 15:24:34 +0800 |
| commit | 00e7eab4eb65cbb4e396837281ebf4a38cdcd7ad (patch) | |
| tree | 5fb262c51228836193e56773ce48aaf21f6ddb3a | |
| parent | 11e0bbedadcd950bb17bf4d97adfd0afb0bce713 (diff) | |
feat: shows zoom-in cursor when hovering on images
| -rw-r--r-- | src/lightbox.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lightbox.js b/src/lightbox.js index f7dd8b3..22cf0ff 100644 --- a/src/lightbox.js +++ b/src/lightbox.js @@ -30,6 +30,7 @@ export default class LightBox { this.images.forEach(image => { if (image.tagName !== 'IMG') return; image.id = crypto.randomUUID(); // generate unique id for each image + image.style.cursor = 'zoom-in'; image.addEventListener('click', () => this.open(image)); // click image to open lightbox }); } |
