Generate CSS gradient border styles online Β· Linear & Radial gradients Β· Live preview Β· One-click copy
/* Adjust controls to generate code */
A CSS gradient border is a decorative technique that uses gradient colors as border styles. By combining the border-image property with linear-gradient() or radial-gradient() functions, you can create smooth color transitions on element borders, replacing traditional single-color borders and adding modern visual depth to web design.
Regular borders (border) only support a single color, while gradient borders (border-image + gradient) create smooth color transitions. Gradient borders support multiple color stops, custom angles, and shapes for richer, more modern visual effects.
border-image is the standard approach for gradient borders. It occupies space inside the element and supports border-radius. outline draws outside the element, doesn't support border-radius, and can't control individual sides independently. This tool uses the background + mask technique when border-radius is applied.
The generated CSS code works in all modern browsers (Chrome 90+, Firefox 90+, Safari 15+, Edge 90+). IE does not support border-image with gradients. Consider adding a solid color fallback background for older browsers.
border-image doesn't natively support border-radius. The solution is a background + mask combination β this tool automatically generates that approach when border-radius > 0, ensuring rounded gradient borders display correctly.