vue 錨點定位 ...
Vue項目中需要實現滑動吸頂以及錨點定位功能。template代碼如下: lt template gt lt div class main gt lt div id menu gt lt ul gt lt li v for item in tabList click clickTab gt lt li gt lt ul gt lt div gt lt div id div gt lt div gt ...
2020-05-09 15:57 0 1261 推薦指數:
vue 錨點定位 ...
文來自:https://blog.csdn.net/qq_43369797/article/details/98966790 功能: HTML: js: ...
vue代碼 css代碼 參考網站實現功能:https://www.yisu.com/zixun/603790.html 參考網站實現功能:https://blog.csdn.net/qq493820798 ...
//模擬錨點跳轉goAnchor(selector) { let anchor = this.$el.querySelector(selector); //document.documentElement.scrollTop ...
App公共頁面 goto(page, selectID) { console.log(this.$route.path ...
1 當前組件的頂部 this.$el.scrollIntoView() 2 指定的 Element this.$el.querySelector(selector).scrollIntoView ...
...
場景如下: 今天早上看到需求方新提的一個需求,這是一份網上答卷,點擊題數要實現滾動到對應題目的位置; 注意點:每題題目的高度是不受控制的,你可以取到想跳轉的index;(我再循環題 ...