/

HTML / CSS / JavaScript Tutorial

CSS Property: border-image-outset

[this page | pdf | back links]

The CSS (CSS3) border-image-outset property specifies the amount by which a border image area extends beyond the border box.

 

Valid property values (other than inherit and initial) are:

 

Value

Description

length

A CSS length that specifies how far from the edges the border-image will appear

number

Multiples of the relevant border-width

 

Default Value:

0

JavaScript syntax:

e.g. object.style.borderImageOutset="30px"

Inherited:

No

Animatable:

No

 

EXAMPLE:


HTML USED IN THIS EXAMPLE:
<!DOCTYPE html>
<html> <!-- Copyright (c) Nematrian Limited 2018 -->
<head>
<style>
p {
  border: 10px solid transparent;
  border-image: url('NematrianLogo.png') 10 round;
  padding: 15px;
}
.x2 {border-image-outset: 0.4;}
</style>
</head>
<body>
<p>1. border-image: url('NematrianLogo.png') 100% 1 .2 repeat;</p>
<p class="x2">2. different border-image-outset property</p>
<p id="x3">3. as per Element 2 but set using JavaScript</p>

<script>
document.getElementById("x3").style.borderImageOutset = "0.4";
</script>

</body>
</html>

FUNCTION THAT MAY ASSIST IN TESTING WHETHER FEATURE IS SUPPORTED:
function isSupportedCSSPropertyBorderImageOutset() {
  var x = document.createElement("DIV"); x.style.borderImageOutset = "0.4"; return (window.getComputedStyle(x, null).borderImageOutset == "0.4");
}


NAVIGATION LINKS
Contents | Prev | Next | CSS Properties


Desktop view | Switch to Mobile