CSS Border Colour Into 4 Colours

前端 未结 6 1755
走了就别回头了
走了就别回头了 2021-01-12 01:49

Is there any way that I can have 4 different colours on one side of a border in CSS? I currently have

#header
{
border-color:#88a9eb;
}

I w

6条回答
  •  死守一世寂寞
    2021-01-12 02:29

    you can try this one:

    .solid{
    
      width: 300px;
      border-image: linear-gradient(to right, red 25%, blue 25%, blue 50%, green 50%, green 75%, orange 75%);
      border-image-slice: 4;
    
    
    }
    

    DEMO

提交回复
热议问题