diff options
| author | QuarkPixel <m2462864403@gmail.com> | 2025-09-18 14:51:22 +0800 |
|---|---|---|
| committer | QuarkPixel <m2462864403@gmail.com> | 2025-09-18 14:51:22 +0800 |
| commit | 543cf58f0e6aeba3b31ac91ebc7de44a3953adc6 (patch) | |
| tree | dac1885628a3d5fbe0a23f0fde18b9ba42cac64f | |
| parent | 461b268e16f4b9369637da17afba1c814726b58f (diff) | |
docs: update README
| -rw-r--r-- | README.md | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -41,12 +41,24 @@ You can configure Libra.js by passing an object to the constructor. The defaults ```js new LightBox({ - selector: '[data-libra]', // Selector for images to be lightboxed - margin: 50, // Margin around the lightbox - offset: { x: 0, y: 0 } // Offset for the lightbox position + selector: "[data-libra]", // Selector for images to be lightboxed + margin: 50, // Margin around the lightbox + offset: { x: 0, y: 0 }, // Offset for the lightbox position + transitionDuration: 200, // Animation duration in milliseconds + imageCursor: "zoom-in", // Cursor style for hoverable images }); ``` +### Z-index Configuration + +Z-index values are managed through CSS classes for better maintainability: + +- `.libra-overlay.libra-visible`: z-index 900 (overlay when visible) +- `.libra-overlay.libra-hidden`: z-index -100 (overlay when hidden) +- `.libra-shadow`: z-index 1000 (shadow image) + +You can customize these values by overriding the CSS classes in your own stylesheet. + ## Development ``` |
