How can I prevent CSS gradient banding?

后端 未结 7 1782
别那么骄傲
别那么骄傲 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:55

    I know this is a bit very late, but I discovered a trick that works. For anyone having that rough edge at meet point of the colors. This removes it.

    .gradient {
      background: linear-gradient(
        173deg,
        rgba(0, 132, 255, 1) 50%,
        rgba(255, 255, 255, 1) 50.5%
      );
    }
    

提交回复
热议问题