- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Adding CSS3 Border Images
To add border images in CSS3, use the border-image property. It is a shorthand property for the following properties −
border-image-source border-image-slice border-image-width border-image-outset border-image-repeat
The values can be set as;
border-image: source slice width outset repeat|initial|inherit;
Example
Let us now see an example −
<!DOCTYPE html> <html> <head> <style> #demo { border: 20px solid; padding: 20px; border-image: url(https://www.tutorialspoint.com/images/home_ai_python.png) 20 round; } </style> </head> <body> <h1>PyTorch Tutorial</h1> <p>PyTorch is an open source machine learning library for Python and is completely based on Torch.</p> <p id="demo">It is primarily used for applications such as natural language processing.</p> </body> </html>
Output
Example
Let us now see another example −
<!DOCTYPE html> <html> <head> <style> #demo { border: 20px solid; padding: 20px; border-image: url(https://www.tutorialspoint.com/images/home_pytorch.png) 40% round; } </style> </head> <body> <h1>TensorFlow Tutorial</h1> <p>TensorFlow is an open source machine learning framework for all developers. It is used for implementing machine learning and deep learning applications.</p> <p id="demo"> To develop and research on fascinating ideas on artificial intelligence, Google team created TensorFlow. </p> </body> </html>
Output
- Related Articles
- Adding Drop Shadow to Images using CSS3
- Adding Multiple Backgrounds with CSS3
- Applying Opacity to Images using CSS3
- Applying Sepia Effect to Images using CSS3
- Adjusting the Saturation of Images using CSS3
- How to create Border Images in CSS
- CSS3 Resize Property
- CSS3 font combinations
- CSS3 Opacity property
- CSS3 Linear gradients
- CSS3 Radial Gradients
- CSS3 Diagonal Gradient
- CSS3 Animation @keyframes
- CSS3 Rounded corners
- CSS3 User Interface Property

Advertisements