File tree Expand file tree Collapse file tree 3 files changed +154
-247
lines changed Expand file tree Collapse file tree 3 files changed +154
-247
lines changed Original file line number Diff line number Diff line change 11# svelte-img
22
3- > Elegant responsive images for SvelteKit.
3+ > High-performance responsive images for SvelteKit.
44
55Automatically transform local images into multiple widths and next-gen formats, then render a
66minimally invasive HTML representation into your SvelteKit project.
77
8+ Includes special effects:
9+
10+ - [x] Fade-in on image reveal
11+ - [x] Parallax vertical scroll effect
12+
813Demo: https://zerodevx.github.io/svelte-img/
914
1015## Install
@@ -232,10 +237,12 @@ import { FxReveal as Img } from '@zerodevx/svelte-img'
232237
233238#### Parallax
234239
235- Apply a parallax effect to an image. ` factor ` is a number between ` 0 ` to ` 1 ` , where:
240+ Apply a parallax effect to an image, where ` factor ` is a decimal value between 0 and 1 that controls
241+ how much slower the element scrolls relative to the scrolling speed:
236242
237- - ` 1 ` behaves normally (image scrolls along with the page at same speed);
238- - and ` 0 ` essentially fixes the image on the page.
243+ - A value closer to 0 is faster, while a value closer to 1 is slower.
244+ - A value of 1 behaves normally.
245+ - A value of 0 effectively makes the element scroll fixed with the page.
239246
240247The default factor is ` 0.75 ` .
241248
You can’t perform that action at this time.
0 commit comments