border-image: none | url(image) imagesection [/imagewidth] imagehandling
|
<!DOCTYPE html>
<html> <style> p{ border: 4px solid transparent; width: 70%; height: 50%; text-align: center; border-image: url(image1.jpg) 40 round; } </style> <body> <p>Thi is a sample peragraph Lorem, ipsum dolor sit amet consectetur adipisicing elit. Et officiis, praesentium eos voluptas maiores porro, saepe perspiciatis perferendis, rerum doloribus expedita quam excepturi quas voluptatum quos quidem iure aliquid exercitationem!</p> </body> </html> |
NOTE -
• In Mozilla-based browsers like Firefox this property is -moz-border-image and in WebKit-based browsers like Chrome or Safari it is -webkit-border-image. • The border image will tile over the center of the image as well, but if you make it transparent, you can have a background image or color show as well. • The border image will cover a defined standard border, so it is useful to have a fallback in case browsers do not support this emerging property. |