CSS position:sticky

- WD

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.

IE

  1. 5.5 - 10: Not supported
  2. 11: Not supported

Edge

  1. 12 - 15: Not supported
  2. 16 - 18: Partial support
  3. 79 - 85: Partial support
  4. 86: Partial support

Firefox

  1. 2 - 25: Not supported
  2. 26 - 31: Disabled by default
  3. 32 - 58: Partial support
  4. 59 - 80: Supported
  5. 81: Supported
  6. 82 - 83: Supported

Chrome

  1. 4 - 22: Not supported
  2. 23 - 36: Disabled by default
  3. 37 - 51: Not supported
  4. 52 - 55: Disabled by default
  5. 56 - 85: Partial support
  6. 86: Partial support
  7. 87 - 89: Partial support

Safari

  1. 3.1 - 6: Not supported
  2. 6.1 - 7: Partial support
  3. 7.1 - 12.1: Supported
  4. 13 - 13.1: Supported
  5. 14: Supported
  6. TP: Supported

Opera

  1. 9 - 38: Not supported
  2. 39 - 41: Disabled by default
  3. 42 - 70: Partial support
  4. 71: Partial support

iOS Safari

  1. 3.2 - 5.1: Not supported
  2. 6 - 7.1: Partial support
  3. 8 - 12.4: Supported
  4. 13 - 13.7: Supported
  5. 14: Supported

Opera Mini

  1. all: Not supported

Android Browser

  1. 2.1 - 4.4.4: Not supported
  2. 81: Partial support

Blackberry Browser

  1. 7: Not supported
  2. 10: Not supported

Opera Mobile

  1. 10 - 12.1: Not supported
  2. 59: Partial support

Chrome for Android

  1. 85: Partial support

Firefox for Android

  1. 79: Supported

IE Mobile

  1. 10: Not supported
  2. 11: Not supported

UC Browser for Android

  1. 12.12: Partial support

Samsung Internet

  1. 4 - 5.4: Not supported
  2. 6.2 - 11.2: Supported
  3. 12.0: Supported

QQ Browser

  1. 10.4: Partial support

Baidu Browser

  1. 7.12: Not supported

KaiOS Browser

  1. 2.5: Partial support

Any ancestor between the sticky element and its user-scrollable container with overflow computed as anything but visible/clip will effectively prevent sticking behavior.

Resources:
MDN Web Docs - CSS position
HTML5Rocks
Polyfill
Another polyfill
geddski article: Examples and Gotchas
WebPlatform Docs