The border-image-outset
property is used to specify the amount by which the border image area extends beyond the border box. It is a part of the CSS border-image module and is used to create borders with images.
The border-image-outset
property is used in conjunction with the border-image-source
, border-image-slice
, border-image-width
, and border-image-repeat
properties to create a border with an image. The border-image-outset
property specifies the amount by which the border image area extends beyond the border box.
The border-image-outset
property can take one, two, three, or four values. If one value is specified, it applies to all four sides of the border. If two values are specified, the first value applies to the top and bottom borders, and the second value applies to the left and right borders. If three values are specified, the first value applies to the top border, the second value applies to the left and right borders, and the third value applies to the bottom border. If four values are specified, they apply to the top, right, bottom, and left borders, respectively.
Here are some examples of using the border-image-outset
property:
<!-- One value -->
border-image-outset: 10px;
<!-- Two values -->
border-image-outset: 10px 20px;
<!-- Three values -->
border-image-outset: 10px 20px 30px;
<!-- Four values -->
border-image-outset: 10px 20px 30px 40px;
The border-image-outset
property can also take negative values, which will cause the border image area to be inside the border box instead of outside. Here is an example:
border-image-outset: -10px;
The border-image-outset
property can be used to create borders with images that have rounded corners. Here is an example:
border-image-source: url(border.png);
border-image-slice: 30;
border-image-width: 10px;
border-image-outset: 20px;
In this example, the border-image-source
property specifies the image to use for the border, the border-image-slice
property specifies how to slice the image, the border-image-width
property specifies the width of the border, and the border-image-outset
property specifies the amount by which the border image area extends beyond the border box.
The border-image-outset
property is supported in all major browsers, including Chrome, Firefox, Safari, and Internet Explorer.
The border-image-outset
property is a useful tool for creating borders with images. It allows you to specify the amount by which the border image area extends beyond the border box, which can be used to create borders with rounded corners or other custom shapes. By using the border-image-outset
property in conjunction with the other border-image properties, you can create unique and visually appealing borders for your web pages.