Home >Web Front-end >CSS Tutorial >How to use border-image-source attribute
The border-image-source attribute specifies the image to use instead of the border style set by the border-style attribute.
CSS3 border-image-source attribute
Function: Requires The image used instead of the border style set in the border-style property.
Syntax:
border-image-source: none|image;
none: Indicates that no image is used.
image: Represents the path of the image used as the border.
Description: If the value is "none", or if the image cannot be displayed, the border style is used.
CSS3 border-image-source attribute usage example
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <style> div { border: 30px solid transparent; width: 200px; height: 50px; border-image-source: url('https://img.php.cn/upload/article/000/000/024/5c62637b1a4fe853.png'); border-image-repeat: round; border-image-slice:30; } </style> </head> <body> <div> DIV 使用图像边框 </div> </body> </html>
Rendering:
The above is the detailed content of How to use border-image-source attribute. For more information, please follow other related articles on the PHP Chinese website!