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
alt="The layout of the scroller</code>’s contents in the example. Snap points are set along the x-axis, starting at 0px and repeating at intervals of 100% of the containing block's width."
Copy file name to clipboardExpand all lines: css-snappoints/Overview.src.html
+13-5Lines changed: 13 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -111,7 +111,11 @@ <h3 id="values">
111
111
<h2id="examples">Examples
112
112
</h2>
113
113
<divclass=example>
114
-
<p>In this example, a series of images arranged in a <span>scroller</span> are used to build a photo gallery. The <span>scroller</span> is sized to the same size of the images contained therein. Using mandatory snap points, scrolling will always complete with a snap point aligned to the edge of the <span>scroller</span>. By aligning a snap point at the edge of each image, this creates a photo viewer were users can scroll through the images one at a time.</p>
114
+
<p>In this example, a series of images arranged in a <span>scroller</span> are used to build a photo gallery.
115
+
The <span>scroller</span> is sized to the same size of the images contained therein. Using mandatory snap
116
+
points, scrolling will always complete with a snap point aligned to the edge of the <span>scroller</span>.
117
+
By aligning a snap point at the edge of each image, this creates a photo viewer were users can scroll
118
+
through the images one at a time.</p>
115
119
<pre>img {
116
120
width:500px;
117
121
}
@@ -128,10 +132,11 @@ <h2 id="examples">Examples
128
132
</div></code>
129
133
130
134
<divclass=figure>
131
-
<p><imgsrc="example1layout.png"
135
+
<p><imgsrc="example1.png"
132
136
alt="The layout of the scroller's contents in the example. Snap points are set along the x-axis, starting at 0px and repeating at intervals of 100% of the containing block's width.">
133
137
134
-
<pclass=caption>The layout of the scroller's contents in the example. Snap points are set along the x-axis, starting at 0px and repeating at intervals of 100% of the containing block's width.
138
+
<pclass=caption>The layout of the scroller's contents in the example. Snap points are set along
139
+
the x-axis, starting at 0px and repeating at intervals of 100% of the containing block's width.
135
140
</div>
136
141
</div>
137
142
<h3id="definitions">
@@ -142,7 +147,8 @@ <h3 id="definitions">
142
147
</dl>
143
148
<h3id="scroll-snap-type">
144
149
Scroll Snap Types: the 'scroll-snap-type' property</h3>
145
-
<p>The ''scroll-snap-type'' property is used to define the physics characteristics of panning and scrolling, if any. It defines how and when snap points are enforced on the scroller it is applied to. </p>
150
+
<p>The ''scroll-snap-type'' property is used to define the physics characteristics of panning and scrolling,
151
+
if any. It defines how and when snap points are enforced on the scroller it is applied to. </p>
<dd>Defines a starting snap point and an interval at which additional snap points are defined. The first argument is the starting snap point and the second argument is the interval to repeat thereafter. </dl>
233
+
<dd>Defines a starting snap point and an interval at which additional snap points are defined.
234
+
The first argument is the starting snap point and the second argument is the interval to
0 commit comments