Does WebKit have a clipping bug?

后端 未结 2 1230
终归单人心
终归单人心 2021-02-12 14:49

Given a region where the line-height and any margins are n, and the region has a height that is a multiple of n, and the scrollTop is increased by mult

2条回答
  •  猫巷女王i
    2021-02-12 15:49

    Have you tried increasing line height by 1px? I tried it in Chrome and it works:

    line-height: 22px;
    height: 220px; /* A multiple of line height */
    

    and:

    document.getElementById('wrapper').scrollTop += 220;
    

    Alternatively you can reduce the font size by 1px which also works for me:

    /* alternative solution: */
    font-size: 18px;
    

提交回复
热议问题