Detect support for background-attachment: fixed?

前端 未结 7 1679
花落未央
花落未央 2020-12-31 02:09

Is there a way to detect browser support for background-attachment: fixed?

Edit: Although this feature is widely supported on desktop browsers it is poorly supported

相关标签:
7条回答
  • 2020-12-31 03:08

    I think I've got the solution for all devices. It's possible to detect clip-support, so I did just that and made a change in the DOM for when clip is supported. If it isn't, it falls back on background-attachment: fixed;

    See the code at https://codepen.io/AartdenBraber/pen/gGmdWK

    0 讨论(0)
提交回复
热议问题