| Learn | CSS - Border - Creating a multi colored border using border image |
|---|
Creating a multi-colored border using border-image CSSHTMLThe above example would produce a border that comprises of 5 different colors. The colors are defined through a (Note: Additional properties were added to the element for presentational purpose.) You'd have noticed that the left border has only a single color (the start color of the gradient) while the right border also has only a single color (the gradient's end color). This is because of the way that border image property works. It is as though the gradient is applied to the entire box and then the colors are masked from the padding and content areas, thus making it look as though only the border has the gradient. Which border(s) have a single color is dependant on the gradient definition. If the gradient is a If the border is required only on specific sides of the element then the Note that, any element that has A box's backgrounds, but not its border-image, are clipped to the appropriate curve (as determined by ‘background-clip’). |
Read Article
https://develop.horje.com/learn/1434/reference