You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Overview.bs
+24-25Lines changed: 24 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -263,50 +263,49 @@ union.timeline = new ScrollTimeline({
263
263
264
264
### The content progress bar ### {#content-progress-bar-usecase}
265
265
266
-
There is much content that using to scroll linked animations.
267
-
Here's one of these animation content, this content has a long article.
268
-
And this content has a progress bar which indicates the current position of the article.
269
-
270
-
If we scroll the content, this progress bar increased / decreased.
266
+
Another common example of an animation that tracks scroll position is a
267
+
progress bar that is used to indicate the reader's position in a long
268
+
article.
271
269
272
270
<figure>
273
271
<img src="img/usecase3-2.svg" width="600"
274
-
alt="Use case 3-2: Scroll based styling">
272
+
alt="Use case: Scroll based styling">
275
273
<figcaption>
276
-
Use case 3-2: Content progress bar.<br>
277
-
The left figure is before scroll, the progress bar is not displayed.<br>
278
-
The right figure is after scroll, the progress bar advanced.
274
+
Content progress bar.<br>
275
+
The left figure shows the initial state before scrolling.<br>
276
+
The right figure shows the progress bar is half-filled in since the
277
+
user has scrolled half way through the article.
279
278
</figcaption>
280
279
</figure>
281
280
282
-
Usually, we won't need to this progress bar, because the scroll bar indicated the progress. But some content will want to hide the scroll bar, like this content.
281
+
Typically, the scroll bar provides this visual indication but
282
+
applications may wish to hide the scroll bar for aesthetic or useability
283
+
reasons.
284
+
285
+
Using the 'animation-timeline' property, this example could be written
286
+
as follows:
283
287
284
-
If we use animation-timeline, this example code will be as follow.
<p>There is much content that using to scroll linked animations.
556
-
Here’s one of these animation content, this content has a long article.
557
-
And this content has a progress bar which indicates the current position of the article.</p>
558
-
<p>If we scroll the content, this progress bar increased / decreased.</p>
555
+
<p>Another common example of an animation that tracks scroll position is a
556
+
progress bar that is used to indicate the reader’s position in a long
557
+
article.</p>
559
558
<figure>
560
-
<imgalt="Use case 3-2: Scroll based styling" src="img/usecase3-2.svg" width="600">
561
-
<figcaption> Use case 3-2: Content progress bar.<br> The left figure is before scroll, the progress bar is not displayed.<br> The right figure is after scroll, the progress bar advanced. </figcaption>
559
+
<imgalt="Use case: Scroll based styling" src="img/usecase3-2.svg" width="600">
560
+
<figcaption> Content progress bar.<br> The left figure shows the initial state before scrolling.<br> The right figure shows the progress bar is half-filled in since the
561
+
user has scrolled half way through the article. </figcaption>
562
562
</figure>
563
-
<p>Usually, we won’t need to this progress bar, because the scroll bar indicated the progress. But some content will want to hide the scroll bar, like this content.</p>
564
-
<p>If we use animation-timeline, this example code will be as follow.</p>
<p>Typically, the scroll bar provides this visual indication but
564
+
applications may wish to hide the scroll bar for aesthetic or useability
565
+
reasons.</p>
566
+
<p>Using the <aclass="property" data-link-type="propdesc" href="#propdef-animation-timeline" id="ref-for-propdef-animation-timeline-1">animation-timeline</a> property, this example could be written
<p>A <codeclass="idl"><adata-link-type="idl" href="#scrolltimeline" id="ref-for-scrolltimeline-8">ScrollTimeline</a></code> may be applied to a CSS Animation <adata-link-type="biblio" href="#biblio-css3-animations">[CSS3-ANIMATIONS]</a> using
1097
-
the <aclass="property" data-link-type="propdesc" href="#propdef-animation-timeline" id="ref-for-propdef-animation-timeline-2">animation-timeline</a> property.</p>
1095
+
the <aclass="property" data-link-type="propdesc" href="#propdef-animation-timeline" id="ref-for-propdef-animation-timeline-3">animation-timeline</a> property.</p>
@@ -1129,7 +1127,7 @@ <h3 class="heading settled" data-level="4.2" id="animation-timeline"><span class
1129
1127
<td>no
1130
1128
</table>
1131
1129
<p><dfnclass="dfn-paneled css" data-dfn-type="type" data-export="" id="typedef-single-animation-timeline"><single-animation-timeline></dfn> = auto | scroll([<aclass="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#time-value" title="Expands to: s | ms"><time></a> [, <aclass="production css" data-link-type="type" href="https://drafts.csswg.org/css-animations-1/#typedef-single-animation-fill-mode"><single-animation-fill-mode></a>]])</p>
1132
-
<p>The <aclass="property" data-link-type="propdesc" href="#propdef-animation-timeline" id="ref-for-propdef-animation-timeline-3">animation-timeline</a> property is similar to properties like <aclass="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-animations-1/#propdef-animation-duration">animation-duration</a> and <aclass="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-animations-1/#propdef-animation-timing-function">animation-timing-function</a> in that it can have one or more values, each one imparting
1130
+
<p>The <aclass="property" data-link-type="propdesc" href="#propdef-animation-timeline" id="ref-for-propdef-animation-timeline-4">animation-timeline</a> property is similar to properties like <aclass="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-animations-1/#propdef-animation-duration">animation-duration</a> and <aclass="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-animations-1/#propdef-animation-timing-function">animation-timing-function</a> in that it can have one or more values, each one imparting
1133
1131
additional behavior to a corresponding <adata-link-type="dfn" href="https://w3c.github.io/web-animations/#concept-animation">animation</a> on the
1134
1132
element, with the timelines matched up with animations as described <ahref="https://drafts.csswg.org/css-animations-1/#animation-name">here</a>.</p>
1135
1133
<p>Each value has type <aclass="production css" data-link-type="type" href="#typedef-single-animation-timeline" id="ref-for-typedef-single-animation-timeline-2"><single-animation-timeline></a>, whose possible values have the
<li><ahref="#ref-for-propdef-animation-timeline-1">4.2. The animation-timeline property</a><ahref="#ref-for-propdef-animation-timeline-2">(2)</a><ahref="#ref-for-propdef-animation-timeline-3">(3)</a>
1933
+
<li><ahref="#ref-for-propdef-animation-timeline-1">2.3.2. The content progress bar</a>
1934
+
<li><ahref="#ref-for-propdef-animation-timeline-2">4.2. The animation-timeline property</a><ahref="#ref-for-propdef-animation-timeline-3">(2)</a><ahref="#ref-for-propdef-animation-timeline-4">(3)</a>
0 commit comments