簡體   English   中英

滾動進度條,但用於水平滾動

[英]scroll progress bar but for horizontal scrolling

我正在嘗試制作一個滾動進度條,就像https://scrollprogressbar.github.io/提供的那樣。 唯一的問題是我的網站已經翻轉,所以我可以進行水平滾動。

 .wrapper-wrapper { width: 100vh; height: 100vw; transform: rotate(-90deg) translateX(-100vh); transform-origin: top left; overflow-y: scroll; overflow-x: hidden; position: absolute; scrollbar-width: none; -ms-overflow-style: none; }.wrapper { display: flex; flex-direction: row; width: 400vw; transform: rotate(90deg) translateY(-100vh); transform-origin: top left; }
 <div class="wrapper-wrapper"> <div class="wrapper"></div> </div>

簡而言之,我的網站水平滾動,因此它不會給出垂直值,從而使滾動進度條無能為力。 我應該怎么辦?

用這個。

scroll-direction: horizontal;

文檔鏈接: https://css-tricks.com/pure-css-horizontal-scrolling/

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM