The border-image
property is a shorthand property for
the following properties:
The omitted values will be set to their default values.
border-image: source slice width outset repeat|initial|inherit;
border-image |
Yes | 11.0 | Yes | 6.0 (3.1 -webkit-) | Yes |
<!DOCTYPE html>
<html>
<head>
<style>
div {<!-- w ww.j ava 2s . co m-->
border: 15px solid transparent;
width: 250px;
padding: 10px 20px;
}
#round {
-webkit-border-image: url(http://java2s.com/style/demo/border.png) 30 30 round; /* Safari 3.1-5 */
-o-border-image: url(http://java2s.com/style/demo/border.png) 30 30 round; /* Opera 11-12.1 */
border-image: url(http://java2s.com/style/demo/border.png) 30 30 round;
}
#stretch {
-webkit-border-image: url(http://java2s.com/style/demo/border.png) 30 30 stretch; /* Safari 3.1-5 */
-o-border-image: url(http://java2s.com/style/demo/border.png) 30 30 stretch; /* Opera 11-12.1 */
border-image: url(http://java2s.com/style/demo/border.png) 30 30 stretch;
}
</style>
</head>
<body>
<div id="round">Here, the image is tiled (repeated) to fill the area.</div><br>
<div id="stretch">Here, the image is stretched to fill the area.</div>
<p>Here is the image used:</p>
<img src="http://java2s.com/style/demo/border.png">
</body>
</html>