position: sticky;设置宽度
时间: 2023-10-25 18:29:16 浏览: 115
根据引用提供的代码,position: sticky;并不会设置宽度。它仅仅是一个控制元素粘性布局的属性,用于实现吸顶操作。在这个例子中,它被用于让.fixed-box元素一直固定在页面顶部,不会影响到常规布局。设置宽度的操作应该在其他属性或样式中进行。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [position:sticky用法介绍及浏览器兼容性](https://download.csdn.net/download/weixin_38724919/14829608)[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%"]
- *2* *3* [position: sticky属性的基本使用](https://blog.csdn.net/weixin_43636361/article/details/126707014)[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 ]
阅读全文