前端 頁面自定義滾動條


示例

代碼

<div class="p-detail__table-scrollbar">
    <div style="width: 3300px;height: 10px;">
    </div>
</div>

<style>
.p-detail__table-scrollbar{
    overflow-x: scroll;
    overflow-y: hidden;
}
.p-detail__table-scrollbar::-webkit-scrollbar{
    width:1px;
    height: 10px;
    background-color: #ccc;
    border-radius: 5px;
}
.p-detail__table-scrollbar::-webkit-scrollbar-track{
    border-radius: 5px;
}
.p-detail__table-scrollbar::-webkit-scrollbar-thumb{
    border-radius: 5px;
    background-color: #333;
}
</style>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM