I have this box with a linear gradient background created as a two-color solid color. One color - 44px - the rest have a different color, for example:
background: linear-gradient(to left, #365aa5 44px, #f5f5f5 0);
It works great. Now I would like to add a two-color border at the top and bottom of this element, using linear gradients of the border image in the same way that the border colors match the background color. The trick is to use linear gradients in the form of solid colors.
I tried something like this:
border-image: linear-gradient(right, #365aa5 44px, #000 0); border-style: solid; border-width: 2px 0 2px 0;
But obviously it does not work.
Any ideas how I could make this work?
JsFiddle is here .
source share