Border Image - Create image borders in CSS
CSS Border Image is adding images that appear on the border for elements. You don't need to use any HTML code to call the Border Image.
The border-image attribute in CSS
The border-image attribute in CSS allows you to specify an image that will use the regular border replacement around an element.
Attributes are worth following:
- The image is used as a border
- Where to crop pictures
- Identify parts that are repeated or prolonged.
In this article, TipsMake.com will use the following image named " Border-image.png ":
The border-image attribute cuts the image into nine style sections like the checkerboard flag as follows:
Now notice the sections 1, 3, 7, 9 are four corners and it is fixed, part 5 is the central position and the rest will be affected by values like round, repeat or stretch only determined.
Example 1: The middle part of the image is repeated to create a border:
#borderimg {
border: 10px solid transparent;
padding: 15px;
border-image: url(border-image.png) 30 round;
}
In this example, the middle part of the image is repeated to form a border.
Note : Internet Explorer 10 and earlier versions do not support the border-image attribute.
The border-image attribute in CSS
In this example, the middle part of the image is repeated to form a line
rim:
border-image: url (border-image.png) 30 round;
Original image:
Note: Internet Explorer 10 and older versions do not
Support border-image attribute.
Example 2: The middle part of the image is stretched to create a border.
#borderimg {
border: 10px solid transparent;
padding: 15px;
border-image: url(border-image.png) 30 stretch;
}
In this example, the middle part of the image is stretched to form a border.
The border-image attribute in CSS
In this example, the middle part of the image is stretched to form a line
rim:
border-image:
url (border-image.png) 30 stretch;
Original image:
Note: Internet Explorer 10 and older versions do not
Support border-image attribute.
Cut the Border Image to create a new border
The way to slice images to make different borders will create a lot of novelty, completely change the look of the border.
Type 1 slice:
#borderimg1 {
border: 10px solid transparent;
padding: 15px;
border-image: url(border-image.png) 50 round;
}
Type 2 slice:
#borderimg2 {
border: 10px solid transparent;
padding: 15px;
border-image: url(border-image.png) 20% round;
}
Type 3 slice:
#borderimg3 {
border: 10px solid transparent;
padding: 15px;
border-image: url(border-image.png) 30% round;
}
The border-image attribute in CSS
border-image: url (border-image.png) 50 round;
border-image: url (border-image.png) 20% round;
border-image: url (border-image.png) 30% round;
Note: Internet Explorer 10 and older versions do not
Support border-image attribute.
You should read it
May be interested
- How to create a border for photos in Photoshophow to create a border for photos in photoshop. to make photos become more sparkling and beautiful, especially for portraits or artwork. today's article thuthuatphanmem.vn will guide you how to create borders for photos in photoshop in a simple way.
- Create borders for text pages in Wordintroduce how to create borders for text pages in word. to create a border for a text page in word 2013 there are 3 basic ways as follows: 1. use the shapes tool. step 1: go to the insert tab - illustrate - shapes - select a rectangle drawing tool. step
- How to create a white border for photos in Photoshopin photoshop also there are tools to help you create white borders for images quickly. in this article, i will guide you how to create a white border for photos in photoshop.
- Create a border (border) around the textms word: quantruongminh.com continues to guide the tips in office computing. today's tutorial will show you how to create a border (border) around the text and fill the background color of the contoured text.
- Table in HTMLwhat does it take to create a table in html? is it complicated? want to add color to the table border, how to add the background color to the text in the table? in this article tipsmake.com will answer those questions and guide you to basic operations with tables on html, in addition to adding alternate color schemes for rows in the html table. invite you to follow along.
- How to create cool LED borders for Android phonesdo you feel your phone is boring? this will be the way for you to give your android phone a super cool led border.
- How to make a border frame in Wordhow to make a border frame in word to increase the professionalism when designing report covers and books, we often add borders to the cover page. in this article, tipsmake.com will guide you how to make a border for the cover.
- How to Add a Border to Wordthis wikihow teaches you how to create a border around text, images, or pages in a microsoft word document. open your word document. double-click the word document to which you want to add borders. this will open the document in microsoft...
- How to create a table border in Wordcreating a word table border will make the table more beautiful, much more professional.
- How to automatically create valuable cell borders in Excelthere are many ways of highlighting valuable cells in excel, such as creating borders for cells automatically when entering values.