为什么不定位:在Chrome中粘性工作? [英] Why doesn't position: sticky work in Chrome?
问题描述
我如何获得 position:sticky
工作?
我在Chrome 26.0.1410.43 m它不工作:
I tried the following in Chrome 26.0.1410.43 m and it's not working:
thead {
position: -webkit-sticky;
position: -moz-sticky;
position: -ms-sticky;
position: -o-sticky;
position: sticky;
top: 10px;
}
根据这个,它应该可以工作:
According to this, it should work:
http://updates.html5rocks.com/2012 / 08 / Stick-your-landings-position-sticky-lands-in-WebKit
Chrome 23.0.1247.0似乎支持它在26.0.1410.43 m中不起作用。
It seemed to be supported in Chrome 23.0.1247.0, but now it doesn't work in 26.0.1410.43 m.
推荐答案
编辑:您需要启动 - enable-experimental-webkit-features
通过关于:flags
启用标记。
EDIT: You need to launch with --enable-experimental-webkit-features
flag enabled via about:flags
.
更新:这在Chrome v35到v51上无效,Chrome 52通过实验性的网络平台功能标志重新启用此功能。
Update: This does not work on Chrome v35 through v51, Chrome 52 reenables this with the experimental web platform features flag.
这篇关于为什么不定位:在Chrome中粘性工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!