CSS border-image-outset Property

You are Here:

CSS border-image-outset Property

CSS border-image-outset property sets the distance by which an element's border image is set out from its border box.

Example

HTML Online Editor
<!DOCTYPE html> <html lang="en-US"> <head> <style> div{ min-height:50px; width: 200px; background: #f2f2f2; text-align: center; margin: 50px; border-width: 50px; border-style: solid; border-image: url("car-left.png") 95% round; border-image-outset: 25px; } </style> </head> <body> <h1>CSS border-image Property</h1> <div id="point"> border-image-outset: 25px; </div> </body> </html>

Syntax

Using CSS

element{ border-image-outset: 25px; }

Using Javascript

object.style.borderImageOutset="25px";

Animatable

Yes, border-image-outset property is animatable. CSS Animatable Properties Reference.

Default Value

Default value for CSS border-image-outset property is 0.

Property Value

The following table provides a list of values for CSS border-image-outset property.

ValueExplanation
lengthAllows you to define the border-image-outset in any CSS length unit.
NumberThe size of the border-image outset as a multiple of the element's corresponding border-widths.

Using JavaScript

In the following example, we will demonstrate how to set the CSS border-image-outset property of an element using JavaScript.

Example

HTML Online Editor
<!DOCTYPE html> <html lang="en-US"> <head> <style> div{ min-height: 50px; width: 200px; background: #f2f2f2; text-align: center; margin: 50px; border-width: 50px; border-style: solid; border-image: url("car-left.png") 95% round; } </style> </head> <body> <h1>CSS border-image-outset Property</h1> <div> This is div container. </div> <button onclick="myFunction()">Click Me</button> <script> var x = document.getElementsByTagName("div")[0]; function myFunction(){ x.style.borderImageOutset = "25px"; } </script> </body> </html>

Reminder

Hi Developers, we almost covered 98.7% of CSS Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in CSS.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author