A 1 pixel gap only coming on iPad but fine on Safari and Chrome

后端 未结 7 1773
悲哀的现实
悲哀的现实 2021-02-01 18:00

Here at this line after clouds which will be only visible in iPad or iPhone. Any idea how to solve it?

It\'s fine in all other desktop browsers.

7条回答
  •  不要未来只要你来
    2021-02-01 18:29

    If disabling zoom is not wanted, and if the margin trick does not work (it probably works with background colors, but I could not get it to work with background images), here is another solution:

    Make all background images 1 or 2 px bigger (cut them so they contain a 1 px duplicate of the graphics above/below), and use css background-size and background-position to ensure that the extra (unwanted) pixel is not shown - it will then only be used if the browser needs that extra pixel to cover the rendering gap.

    Tested to fix the rendering bug on Android's 2.3's default browser (will test on iPhone & iPad on monday), plus zooming errors in Chrome on PC.

提交回复
热议问题