-webkit-linear-gradient causes banding in Chrome/Safari

前端 未结 6 1827
别跟我提以往
别跟我提以往 2021-01-01 12:44

The title prettymuch says it all. The first picture below is a screenshot when the whole page is about 8000 pixels tall, taken in the latest version of Chrome:

6条回答
  •  我在风中等你
    2021-01-01 13:06

    instead of using background-image, try using this(background) -

     background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#63adf1), color-stop(53%,#ffffff), color-stop(100%,#ffffff)); /* feel free to play with the % values to get what you are looking for */
    

    and also use hex values always. But from an UX prospective it would be better to use as in image(since you are loading an image anyway) and you won't have to worry about cross browser compatibility.

提交回复
热议问题