How can I prevent CSS gradient banding?

后端 未结 7 1779
别那么骄傲
别那么骄傲 2020-12-05 06:20

I started using CSS gradients, rather than actual images, for two reasons: first, the CSS gradient definitely loads faster than an image, and second, they aren\'t supposed t

7条回答
  •  心在旅途
    2020-12-05 06:54

    You can yield slightly better results by making your gradient go from the first colour to transparent, with a background-color underneath for your second colour. I'd also recommend playing around with background-size for large gradients that stretch across the screen, so the gradient doesn't actually fill the whole screen.

提交回复
热议问题