單獨指定頁面隱藏(找到對應的scroll-view)
<style>
/* 全局隱藏滾動條樣式 */
::-webkit-scrollbar {
? display: none;
? width: 0;
? height: 0;
? color: transparent;
? background: transparent;
}
/* 確保scroll-view組件也隱藏滾動條 */
scroll-view::-webkit-scrollbar {
? display: none;
? width: 0;
? height: 0;
? color: transparent;
? background: transparent;
}
/* 為頁面添加隱藏滾動條樣式 */
.comment-list::-webkit-scrollbar {
? display: none;
? width: 0;
? height: 0;
? color: transparent;
? background: transparent;
}
/* 其他樣式保持不變 */
// ... existing code ...
</style>
全局隱藏(在App.vue的css中插入下面代碼即可):
<style>
/* 全局隱藏滾動條 */
::-webkit-scrollbar {
? display: none;
? width: 0 !important;
? height: 0 !important;
? -webkit-appearance: none;
? background: transparent;
}
</style>