sticky属性在Chrome和Safari for iOS中需要先使用-webkit前缀设置:.element { position: -webkit-sticky; position: sticky; } 你可以在 canIUse 上查看浏览器兼容性。