position: fixed
时间: 2023-09-09 18:11:01 浏览: 98
引用中提到,一般要固定某个div,我们会使用position: fixed属性。这个属性可以将元素固定在浏览器窗口的指定位置,不受页面滚动的影响。也就是说,即使页面滚动,该元素仍然会保持在同一个位置。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [position:fixed 固定定位](https://blog.csdn.net/asdfgv2022/article/details/126148655)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [跨浏览器的实践:position:fixed 层的固定定位](https://download.csdn.net/download/weixin_38566318/13075430)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文