Skip to content

Commit 573446b

Browse files
committed
[scroll-animations-1] Add images to explainer (w3c#4913)
These are fairly large GIFs so instead of adding them directly to the repository. I just hosted them on a github gist here and linked to it. https://gist.github.com/majido/a1279d6d986ab8881d51a77e98769e69
1 parent b37179c commit 573446b

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

scroll-animations-1/EXPLAINER.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,9 @@ polyfill](https://flackr.github.io/scroll-timeline/demo/parallax/index.html).
246246
Parallax is a most popular scroll-linked effects on the web today. See Android 10 launch
247247
[site](https://www.android.com/android-10/) for an example of this.
248248

249-
TODO: Add image
249+
![Parallax example](https://gist.github.com/majido/a1279d6d986ab8881d51a77e98769e69/raw/307c1f83367c59a1c0d15f9f696fa483daaf828b/explainer-parallax.gif)
250250

251-
To use parallax with ScrollTimeline APIs, one can simply do:
251+
To create a parallax effect with ScrollTimeline APIs, one can simply do:
252252

253253
```js
254254
let header = document.querySelector('.header');
@@ -270,7 +270,8 @@ often used to create interactive stories. For example see how New York Times app
270270
animations for creative
271271
[storytelling](http://www.nytimes.com/projects/2013/tomato-can-blues/index.html).
272272

273-
TODO: Add image
273+
![Reveal example](https://gist.github.com/majido/a1279d6d986ab8881d51a77e98769e69/raw/307c1f83367c59a1c0d15f9f696fa483daaf828b/explainer-reveal.gif)
274+
274275

275276
Here is a simple example where we reveal each header as they enters the viewport. This example uses
276277
the still unspecified element-based offset syntax.
@@ -302,7 +303,7 @@ the still unspecified element-based offset syntax.
302303
Another common example of an animation that tracks scroll position is a progress bar that is used
303304
to indicate the reader’s position in a long article.
304305

305-
TODO: add image
306+
![Progressbar example](img/usecase3-2.svg)
306307

307308
Below is a simple example where a progress bar is animate from 0 to full width as we scroll the
308309
document.
@@ -321,10 +322,9 @@ document.querySelector('#progressbar').animate({
321322
### Image Zoom In/Out
322323
323324
This is another common usage pattern when an image scales up to fill a larger canvas. For an
324-
example of this see [iPhone 11 launch site](https://www.apple.com/iphone-11/). This can be easily
325-
done by animating the scale or clipe property.
325+
example of this see [iPhone 11 launch site](https://www.apple.com/iphone-11/).
326326
327-
TODO: add image
327+
![Zoom example](https://gist.github.com/majido/a1279d6d986ab8881d51a77e98769e69/raw/307c1f83367c59a1c0d15f9f696fa483daaf828b/explainer-zoom.gif)
328328
329329
In this example we start scaling a DIV as soon as its container fully enters the scrollport and
330330
until it starts existing the scroll port. Not how in this case the animating element is different
@@ -503,7 +503,6 @@ Worklet) could allow very sophisticated scroll-linked animations but this was al
503503
believed this may not be compatible with the Web Animation model.
504504
505505
506-
507506
## Stakeholder Feedback / Opposition
508507
Safari, Mozilla, Chrome, Edge are in favor of the idea. There are engineers from all four browsers
509508
as editors in the specification.

0 commit comments

Comments
 (0)