我有以下的 Sass 代码片段,我希望在表格滚动时
<thead>
元素浮动。在 Safari 中这个功能正常运作,但在 Chrome Version 58.0.3029.110 (64-bit)
中无法实现。我知道 Chrome 曾经断断续续地支持过 sticky
,现在也支持了,但这是最终版本吗?这是一个 Chrome 的 Bug 吗?还是说我需要另一种解决方案?(我更喜欢 CSS 的方法,因为它更加高效。).table {
thead {
background: white;
position: sticky;
top: 0;
z-index: 10;
}
}