- 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
How to create Border Images in CSS
To create border images in CSS, use the border-image property. Following is the code to create border images in CSS −
Example
<!DOCTYPE html> <html> <head> <style> body { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; } .border1 { border: 10px solid transparent; padding: 15px; border-image: url("https://i.picsum.photos/id/677/200/300.jpg") 30 round; } .border2 { border: 10px solid transparent; padding: 15px; border-image: url("https://i.picsum.photos/id/677/200/300.jpg") 2% round; } </style> </head> <body> <h1>Border image in CSS</h1> <p class="border1">Some random sample text inside the paragraph</p> <p class="border2">Some random sample text inside the paragraph</p> </body> </html>
Output
The above code will produce the following output −
- Related Articles
- How to create rounded and circular images with CSS?
- How to create responsive Modal Images with CSS and JavaScript?
- Adding CSS3 Border Images
- How to style images with CSS?
- How to create table border in HTML?
- How to add visual effects to images with CSS?
- How to create a collapsed border in HTML?
- How to change background images on scroll with CSS?
- How to align images side by side with CSS?
- How to create a Border, Border radius, and shadow to a UIView in iPhone/iOS?
- CSS Border Properties
- How to create a border pane using JavaFX?
- How to create Microsoft Word paragraphs and insert Images in Python?
- How to add a border to an image with CSS?
- How to create titled border for a Panel in Java?

Advertisements