CSS Border Colour Into 4 Colours

前端 未结 6 1747
走了就别回头了
走了就别回头了 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:23

    Best solution is with linear-gradient. Definitely. But someone who's the beginner in this could find this solution useful. By using 2-3-4 colors or even more, this is the right way to do them. Not the best solution for this question, but maybe someone while reading this wants to understand better how do the colors with borders work.

    
    
    
    
    
    
    

    One-colored border!

    Two-colored border!

    Three-colored border!

    Four-colored border!

提交回复
热议问题