position:sticky用法 position:sticky是一個新的css3屬性,它的表現(xiàn)類似position:relative和position:fixed的合體,在目標區(qū)域在屏幕中可見時,它的行為就像position:relative; 而當頁面滾動超出目標區(qū)域時,它的表現(xiàn)就像position:fixed,它會固定在目標位置。 使用起來也非常簡單: 復制代碼 代碼如下: .sticky { position: -w...
www.dbjr.com.cn/css/689...html 2025-5-25