且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在CSS中使用线性渐变将div分为2种颜色,但不等分

更新时间:2023-01-27 08:47:35

我认为这段代码会像您的屏幕截图一样发挥作用.

i think this code will make effect like your screen shot.

将此代码放到您想要的选择器中,就像屏幕截图一样.

put this code in selector you want too look like the screen shot.

  background-color: #f87f73;
  background-image: -webkit-linear-gradient( -28deg, #f87f73 0%, #f87f73 60%, #292423 60%, #292423 60%);
  background-image: linear-gradient( -28deg, #f87f73 0%, #f87f73 60%, #292423 60%, #292423 60%);