Is this possible to create 2-axis 4 color gradient in css (bilinear gradient)?

前端 未结 2 644
南笙
南笙 2021-01-06 09:02

My exmaple in JavaScript and . https://codepen.io/KonradLinkowski/pen/QWbjaPr

2条回答
  •  一向
    一向 (楼主)
    2021-01-06 09:51

    You can give a try to radial-gradient

    example to play with snippet / pen:

    html {
      height:100vh;
      background:
        radial-gradient(ellipse at top     left, rgb(236, 249, 87)  15% , transparent 60%), 
        radial-gradient(ellipse at bottom  left, rgb(247, 69, 204)  15% , transparent 60%),
        radial-gradient(ellipse at top    right, rgb(121, 238, 196) 15% , transparent 60%),
        radial-gradient(ellipse at bottom right, rgb(81, 82, 213)   15% , transparent 60%)
    }

提交回复
热议问题