如何在Chrome中模拟CSS滚动捕捉点? [英] How to emulate CSS Scroll Snap Points in Chrome?

查看:73
本文介绍了如何在Chrome中模拟CSS滚动捕捉点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Firefox 39,Safari 9和IE11提供对CSS滚动捕捉点的支持。 Chrome具有开发中的功能

Firefox 39, Safari 9 and IE11 provide support for CSS Scroll Snap Points. Chrome has the feature in development.

是否有可以模拟以下CSS样式的polyfill:

Is there a polyfill that would emulate the following CSS styles:

-webkit-scroll-snap-type: mandatory;
-ms-scroll-snap-type: mandatory;
scroll-snap-type: mandatory;
-webkit-scroll-behavior: smooth;
-ms-scroll-behavior: smooth;
scroll-behavior: smooth;
-webkit-scroll-snap-points-y: repeat(600px);
-ms-scroll-snap-points-y: snapInterval(0px, 600px); /* Old syntax */
scroll-snap-points-y: repeat(600px);
overflow-y: auto;
overflow-x: hidden;

直到该功能由Chrome实施?

until the feature is implemented by Chrome?

推荐答案

Chrome 69将包含该功能。无需任何解决方法。

Chrome 69 will contain the feature. No workaround needed.

只要坐着等。只是坐着等:-)

Just sit and wait. Just sit and wait :-)

这篇关于如何在Chrome中模拟CSS滚动捕捉点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆