1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
---
title: '-ms-scroll-snap-points-y'
slug: Web/CSS/-ms-scroll-snap-points-y
translation_of: Archive/Web/CSS/-ms-scroll-snap-points-y
---
<div>{{CSSRef}}</div>
<div>{{non-standard_header}}</div>
<div> </div>
<p>The <strong><code>-ms-scroll-snap-points-y</code></strong> <a href="/en-US/docs/Web/CSS">CSS</a> property is a <a href="/en-US/docs/Web/CSS/Microsoft_CSS_extensions">Microsoft extension</a> that specifies where snap-points will be located along the y-axis.</p>
<p>{{cssinfo}}</p>
<h2 id="Syntax" name="Syntax">Syntax</h2>
<h3 id="Values" name="Values">Values</h3>
<div class="note">
<p>Note: a <code><length-percentage></code> is a value that can be either a {{cssxref("<length>")}} or a {{cssxref("<percentaqe>")}}.</p>
</div>
<dl>
<dt><code>snapInterval( <length-percentage>, <length-percentage> )</code></dt>
<dd>
<p>Specifies a starting snap-point followed by the interval between all snap-points.</p>
<ul>
<li>The first value specifies where the first snap-point will be placed.</li>
<li>The second value specifies the distance between subsequent snap-points both above and below the initial snap-point.</li>
</ul>
</dd>
<dt><code>snapList( <length-percentage># )</code></dt>
<dd>
<p>Specifies the position of individual snap-points as a comma-separated list of values, each of which represents a zoom factor.</p>
<ul>
<li>If any value is less than {{CSSXref("-ms-scroll-limit-y-min")}} , then {{cssxref("-ms-scroll-limit-y-min")}} is used.</li>
<li>If any value is greater than {{CSSXref("-ms-scroll-limit-y-max")}}, then {{cssxref("-ms-scroll-limit-y-max")}} is used.</li>
</ul>
</dd>
</dl>
<h3 id="Formal_syntax" name="Formal_syntax">Formal syntax</h3>
<pre class="syntaxbox"> {{csssyntax}}
</pre>
<h2 id="Examples" name="Examples">Examples</h2>
<p>This example demonstrates both types of values for the <code>-ms-scroll-snap-points-y</code> property. In the first selector, the first snap-point is at 0%, and the interval is set to 100%. In the second selector, each snap-point is listed separately — 100%, 200%, 300%, and so on. (The <code>-ms-scroll-snap-points-y</code> property behaves identically to the {{cssxref("-ms-scroll-snap-points-x")}} property, but along the y-axis.)</p>
<pre class="brush: css">.container {
overflow-x: auto;
overflow-y: hidden;
-ms-scroll-snap-type: mandatory;
-ms-scroll-snap-points-y: snapInterval(0%, 100%);
width: 480px;
height: 270px;
}
.imageContainer {
-ms-scroll-chaining: chained;
-ms-overflow-style: none;
-ms-content-zooming: zoom;
-ms-scroll-rails: none;
-ms-scroll-limit-y-min: 100%;
-ms-scroll-limit-y-max: 500%;
-ms-scroll-snap-type: proximity;
-ms-scroll-snap-points-y: snapList(100%, 200%, 300%, 400%, 500%);
-ms-overflow-style: none;
width: 480px;
height: 270px;
overflow: auto;
}
</pre>
<h2 id="Specifications" name="Specifications">Specifications</h2>
<p>Not part of any specification.</p>
<h2 id="Remarks" name="Remarks">Remarks</h2>
<p>This property requires Windows 8 or later.</p>
<p>This property has no effect on non-scrollable elements.</p>
<p>Starting with Windows 8.1, this property is also supported for mouse, keyboard, and touchpad interaction.</p>
|