Keeps elements positioned as "fixed" or "relative" depending on how it appears in the viewport. As a result the element is "stuck" when necessary while scrolling.
Spec | https://w3c.github.io/csswg-drafts/css-position/#sticky-pos |
---|---|
Status | W3C Working Draft |
IE | Edge | Firefox | Chrome | Safari | Opera |
---|---|---|---|---|---|
108 | |||||
107 | 107 | TP | |||
106 | 106 | 16.1 | |||
11 | 105 | 105 | 105 | 16.0 | 91 |
10 | 104 | 104 | 104 | 15.6 | 90 |
9 | 103 | 103 | 103 | 15.5 | 89 |
8 | 102 | 102 | 102 | 15.4 | 88 |
Show all | |||||
7 | 101 | 101 | 101 | 15.2-15.3 | 87 |
6 | 100 | 100 | 100 | 15.1 | 86 |
5.5 | 99 | 99 | 99 | 15 | 85 |
98 | 98 | 98 | 14.1 | 84 | |
97 | 97 | 97 | 14 | 83 | |
96 | 96 | 96 | 13.1 | 82 | |
95 | 95 | 95 | 13 | 81 | |
94 | 94 | 94 | 12.1 (*) | 80 | |
93 | 93 | 93 | 12 (*) | 79 | |
92 | 92 | 92 | 11.1 (*) | 78 | |
91 | 91 | 91 | 11 (*) | 77 (4) | |
90 (4) | 90 | 90 (4) | 10.1 (*) | 76 (4) | |
89 (4) | 89 | 89 (4) | 10 (*) | 75 (4) | |
88 (4) | 88 | 88 (4) | 9.1 (*) | 74 (4) | |
87 (4) | 87 | 87 (4) | 9 (*) | 73 (4) | |
86 (4) | 86 | 86 (4) | 8 (*) | 72 (4) | |
85 (4) | 85 | 85 (4) | 7.1 (*) | 71 (4) | |
84 (4) | 84 | 84 (4) | 7 (5,*) | 70 (4) | |
83 (4) | 83 | 83 (4) | 6.1 (5,*) | 69 (4) | |
81 (4) | 82 | 81 (4) | 6 | 68 (4) | |
80 (4) | 81 | 80 (4) | 5.1 | 67 (4) | |
79 (4) | 80 | 79 (4) | 5 | 66 (4) | |
18 (6) | 79 | 78 (4) | 4 | 65 (4) | |
17 (6) | 78 | 77 (4) | 3.2 | 64 (4) | |
16 (6) | 77 | 76 (4) | 3.1 | 63 (4) | |
15 | 76 | 75 (4) | 62 (4) | ||
14 | 75 | 74 (4) | 60 (4) | ||
13 | 74 | 73 (4) | 58 (4) | ||
12 | 73 | 72 (4) | 57 (4) | ||
72 | 71 (4) | 56 (4) | |||
71 | 70 (4) | 55 (4) | |||
70 | 69 (4) | 54 (4) | |||
69 | 68 (4) | 53 (4) | |||
68 | 67 (4) | 52 (4) | |||
67 | 66 (4) | 51 (4) | |||
66 | 65 (4) | 50 (4) | |||
65 | 64 (4) | 49 (4) | |||
64 | 63 (4) | 48 (4) | |||
63 | 62 (4) | 47 (4) | |||
62 | 61 (4) | 46 (4) | |||
61 | 60 (4) | 45 (4) | |||
60 | 59 (4) | 44 (4) | |||
59 | 58 (4) | 43 (4) | |||
58 (3) | 57 (4) | 42 (4) | |||
57 (3) | 56 (4) | 41 (2) | |||
56 (3) | 55 (2) | 40 (2) | |||
55 (3) | 54 (2) | 39 (2) | |||
54 (3) | 53 (2) | 38 | |||
53 (3) | 52 (2) | 37 | |||
52 (3) | 51 | 36 | |||
51 (3) | 50 | 35 | |||
50 (3) | 49 | 34 | |||
49 (3) | 48 | 33 | |||
48 (3) | 47 | 32 | |||
47 (3) | 46 | 31 | |||
46 (3) | 45 | 30 | |||
45 (3) | 44 | 29 | |||
44 (3) | 43 | 28 | |||
43 (3) | 42 | 27 | |||
42 (3) | 41 | 26 | |||
41 (3) | 40 | 25 | |||
40 (3) | 39 | 24 | |||
39 (3) | 38 | 23 | |||
38 (3) | 37 | 22 | |||
37 (3) | 36 (2) | 21 | |||
36 (3) | 35 (2) | 20 | |||
35 (3) | 34 (2) | 19 | |||
34 (3) | 33 (2) | 18 | |||
33 (3) | 32 (2) | 17 | |||
32 (3) | 31 (2) | 16 | |||
31 (1) | 30 (2) | 15 | |||
30 (1) | 29 (2) | 12.1 | |||
29 (1) | 28 (2) | 12 | |||
28 (1) | 27 (2) | 11.6 | |||
27 (1) | 26 (2) | 11.5 | |||
26 (1) | 25 (2) | 11.1 | |||
25 | 24 (2) | 11 | |||
24 | 23 (2) | 10.6 | |||
23 | 22 | 10.5 | |||
22 | 21 | 10.0-10.1 | |||
21 | 20 | 9.5-9.6 | |||
20 | 19 | 9 | |||
19 | 18 | ||||
18 | 17 | ||||
17 | 16 | ||||
16 | 15 | ||||
15 | 14 | ||||
14 | 13 | ||||
13 | 12 | ||||
12 | 11 | ||||
11 | 10 | ||||
10 | 9 | ||||
9 | 8 | ||||
8 | 7 | ||||
7 | 6 | ||||
6 | 5 | ||||
5 | 4 | ||||
4 | |||||
3.6 | |||||
3.5 | |||||
3 | |||||
2 |
Safari on iOS | Opera Mini | Android Browser | Blackberry Browser | Opera Mobile | Android Chrome | Android Firefox | IE Mobile | Android UC Browser | Samsung Internet | QQ Browser | Baidu Browser | KaiOS Browser |
---|---|---|---|---|---|---|---|---|---|---|---|---|
16.1 | ||||||||||||
16.0 | all | 105 | 10 | 64 | 105 | 104 | 11 | 13.4 (4) | 18.0 | 13.1 (4) | 13.18 | 2.5 (3) |
15.6 | 4.4.3-4.4.4 | 7 | 12.1 | 10 | 17.0 | |||||||
15.5 | 4.4 | 12 | 16.0 | |||||||||
15.4 | 4.2-4.3 | 11.5 | 15.0 | |||||||||
Show all | ||||||||||||
15.2-15.3 | 4.1 | 11.1 | 14.0 | |||||||||
15.0-15.1 | 4 | 11 | 13.0 | |||||||||
14.5-14.8 | 3 | 10 | 12.0 | |||||||||
14.0-14.4 | 2.3 | 11.1-11.2 | ||||||||||
13.4-13.7 | 2.2 | 10.1 | ||||||||||
13.3 | 2.1 | 9.2 | ||||||||||
13.2 | 8.2 | |||||||||||
13.0-13.1 | 7.2-7.4 | |||||||||||
12.2-12.5 (*) | 6.2-6.4 | |||||||||||
12.0-12.1 (*) | 5.0-5.4 | |||||||||||
11.3-11.4 (*) | 4 | |||||||||||
11.0-11.2 (*) | ||||||||||||
10.3 (*) | ||||||||||||
10.0-10.2 (*) | ||||||||||||
9.3 (*) | ||||||||||||
9.0-9.2 (*) | ||||||||||||
8.1-8.4 (*) | ||||||||||||
8 (*) | ||||||||||||
7.0-7.1 (5,*) | ||||||||||||
6.0-6.1 (5,*) | ||||||||||||
5.0-5.1 | ||||||||||||
4.2-4.3 | ||||||||||||
4.0-4.1 | ||||||||||||
3.2 |
Any ancestor between the sticky element and its user-scrollable container with overflow computed as anything but visible
/clip
will effectively prevent sticking behavior.
Can be enabled in Firefox by setting the about:config preference layout.css.sticky.enabled to true
Enabled through the "experimental Web Platform features" flag
Not supported on any table
parts - See Firefox bug
Supported on th
elements, but not thead
or tr
- See Chrome bug
Do not appear to support sticky table headers
Supported on th
elements, but not thead
or tr
- See Edge bug
Firefox 58 & below, Chrome 63 & below and Safari 7 & below do not appear to support sticky table headers.
A parent with overflow set to auto
will prevent position: sticky
from working in Safari
Data by caniuse.com
Licensed under the Creative Commons Attribution License v4.0.
https://caniuse.com/css-sticky