一行CSS代码,实现吸顶布局!
2020-06-10 本文已影响0人
潇湘轮回
使用定位属性sticky完成吸顶布局。

.tool-section {
background-color: yellow;
height: 50px;
position: sticky;
top: 0;
}

使用定位属性sticky完成吸顶布局。
.tool-section {
background-color: yellow;
height: 50px;
position: sticky;
top: 0;
}