How to create gradient borders in CSS. To apply a gradient to a border, the most straightforward approach is to use the border-image property (similarly to how it's done with background gradients): The '1' after the linear-gradient declaration is the border-image-slice value. By using 1, we specify we want a single border region.
