CSS border-image property
If you're tired of plain boring borders, good news — CSS allows you to customize them fully. Use the border-image
property to draw an image around an element that will replace its regular border. To add the image, specify its address with the url()
function. You can tweak it if you want the image to be sliced, repeated, scaled, and stretched.[1]
In the example, the value 30
sets image offset to 30 pixels and the value round
means that the image's edge regions are repeated to fill the gap between each border.
Pro Tip: You should also specify border width, style, and color with the border
property anyway, in case the border image fails to load.