V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
weijar

道理我不懂,为什么这个滚动条这么细?

  •  
  •   weijar · Apr 20, 2023 · 2039 views
    This topic created in 1111 days ago, the information mentioned may be changed or developed.

    分别滚动左边的.outer 的内容,及整个 body 的内容, .outer 这个滚动条为什么在移动浏览器上( chrome 、safari 、firefox 都一样)只有 1 个像素宽,几乎看不清。而 body 这个滚动条就很粗呢?

    简直离谱😿一定是我哪里搞错了,因为我的 app 里同样的 absolute 定位的内容块滚动条就不细,app 代码太多一下子搞不明白,所以偷懒问一下谁知道原因?

    在线地址: https://pubcn.oxyry.com/sw.html

    <style>
    .outer {
      position: absolute;
      background: #ffa;
      left: 0;
      top: 0;
      height: 200vh;
      width: 50vw;
      overflow: auto;
      overscroll-behavior: none;
    }
    .inner {
      height: 4000px;
      font-size: 300px;
      overflow: hidden;
    }
    </style>
    
    <div class="outer">
      <div class="inner">
        The quick brown fox jumps over the lazy dog
      </div>
    </div>
    
    Supplement 1  ·  Apr 20, 2023
    果然还是闹笑话了,少了这一行

    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

    加上就正常了😄
    liyang5945
        1
    liyang5945  
       Apr 20, 2023
    兄弟,是你浏览器坏了,我的就是正常的
    makelove
        2
    makelove  
       Apr 20, 2023
    @liyang5945 在移动浏览器上
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2694 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 10:14 · PVG 18:14 · LAX 03:14 · JFK 06:14
    ♥ Do have faith in what you're doing.