scroll-view 锚点
时间: 2023-08-29 22:11:53 浏览: 109
scroll-view 锚点是通过设置 scroll-into-view 属性来实现的。在小程序中,通过在 scroll-view 中设置该属性为指定元素的 id,可以实现滚动到指定元素位置的效果。比如,可以将要滚动到的元素的 id 设置给 scroll-into-view 属性,然后在点击事件或其他触发滚动的操作中,通过改变该属性的值来触发滚动。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [【微信小程序】 scroll-view 实现锚点跳转](https://blog.csdn.net/qq_25285531/article/details/130356290)[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* [微信小程序实现锚点效果 scroll-view的scroll-into-view属性](https://blog.csdn.net/weixin_43951315/article/details/125151230)[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 ]
阅读全文