简体   繁体   English

您如何使Command-f结果的分页动画化?

[英]How do you animate the pagination of command-f results?

For example, search (command-f) "const" on 30secondsofcode.org and paginate through each result with the enter button. 例如,在30secondsofcode.org上搜索(命令-f)“ const”,然后使用回车按钮对每个结果进行分页。 It animates whereas on a regular webpage, the webpage would just jump to the next result with no animation. 它具有动画效果,而在常规网页上,该网页将跳至下一个没有动画的结果。

CSS: CSS:

scroll-behavior: smooth

You can actually find it on the page you linked if you look at the styles of the 'html' tag. 如果您查看'html'标记的样式,则实际上可以在链接的页面上找到它。

Also note that this isn't supported on all browsers: https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior 另请注意,并非所有浏览器都支持此功能: https : //developer.mozilla.org/zh-CN/docs/Web/CSS/scroll-behavior

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM