Line artifacts in mobile Safari

后端 未结 6 1124
灰色年华
灰色年华 2020-12-18 04:39

Safari renders black lines in between divs on my website at some scales. It is particularly bad when it breaks apart an image that is chopped in two different divs for a but

6条回答
  •  不知归路
    2020-12-18 05:10

    The following CSS, added to the problematic div with a specified background-image, is what fixed it for me. Anything less than 3px would still show light artifacts at some Safari zoom levels.

    margin-top: -3px; /* for Mobile Safari dark line artifact */
    padding-top: 3px; /* for Mobile Safari dark line artifact */
    

提交回复
热议问题