CSS Border Images Last Updated : 02 Aug, 2023 Comments Improve Suggest changes Like Article Like Report The border-image property in CSS is used to specify the border of an image. This property creates a border using an image instead of a normal border. The property contains three-part that are listed below: The complete image is used as a border.A slice of the image is used as a borderThe middle section of the image is used (repeated or stretched) as a borderThe border-image property is used to slice an image into nine sections, like a tic-tac-toe board. Syntax: element { border-image: url(border.png);}border-image properties: There are many border-image properties which are listed below: border-image-source: This property is used to set the image path.border-image-width: This property is used to set the width of the border image.border-image-slice: This property is used to slice the border of the image.border-image-repeat: This property is used to set the border of the image as rounded, repeated, and stretched.border-image-outset: This property is used to specify the amount by which the border image area extends beyond the border box.Example: This example shows the use of the border-image property. HTML <!DOCTYPE html> <html> <head> <title> CSS | Border Images </title> <style> body { text-align: center; } h1 { color: green; } .border1 { border: 10px solid transparent; padding: 15px; border-image-source: url( https://media.geeksforgeeks.org/wp-content/uploads/border1-2.png); border-image-repeat: round; border-image-slice: 30; border-image-width: 20px; } .border2 { border: 10px solid transparent; padding: 15px; border-image: url( https://media.geeksforgeeks.org/wp-content/uploads/border1-2.png) 30 stretch; } .border3 { border: 10px solid transparent; padding: 15px; border-image: url( https://media.geeksforgeeks.org/wp-content/uploads/border1-2.png) 20% round; } div { margin-top: 20px; } </style> </head> <body> <h1>GeeksforGeeks</h1> <h2>border-image property</h2> <div class="border1">Border 1</div> <div class="border2">Border 2</div> <div class="border3">Border 3</div> </body> </html> Output: Supported Browsers: The browsers supported by the border-image property are listed below: Google Chrome 16.0 and aboveEdge 12.0 and aboveFirefox 15.0 and aboveOpera 11.0 and aboveSafari 6.0 and above Comment More infoAdvertise with us Next Article CSS Border Images A Ayuush Follow Improve Article Tags : CSS Technical Scripter 2018 Similar Reads CSS direction Property The direction property in CSS is all about setting the text direction within any block element. It offers two values: rtl (right to left) and ltr (left to right), giving you control over the flow of your text.Syntax: element_selector { direction: rtl|ltr|initial|inherit;} Default Value: ltr Property 2 min read CSS background-clip Property The background-clip property in CSS controls how a background (color or image) extends within an element, allowing you to dictate the reach of your background.Syntax:background-clip: border-box | padding-box | content-box | text | initial | inherit;Property value:Â border-box: The border-box property 3 min read CSS tab-size Property The tab-size property in CSS is used to specify the width of the tab character. The tab-size usually displays a single space character in an HTML document. Some elements like <textarea> and <pre> elements display the tab-size.Syntax: tab-size: number|length|initial|inherit;Property Value 2 min read CSS column-gap Property The column-gap property in CSS is used to specify the amount of gap between the columns in which a given text is divided using the column-count property. Syntax:column-gap: length | normal | initial | inherit;Default Value: normal Property Values:Property ValueDescriptionlengthThis value specifies t 3 min read CSS animation-iteration-count Property The animation-iteration-count property in CSS specifies the number of times an animation should be repeated. It can also be set to infinite to repeat the animation indefinitely.Syntaxanimation-iteration-count: number | infinite | initial | inherit;Property Valuenumber: Specifies the number of times 3 min read CSS column-count Property The column-count property in CSS is used to divide a portion of content inside any HTML element into a given number of columns.Default Value: autoSyntax: column-count: number|auto|initial|inherit;Property Values: number: This value is used to indicate the number of columns.auto: It is the default va 3 min read CSS column-rule Property The column-rule property in CSS is used to specify the width, style, and color of the rules between the columns.Syntax: column-rule: column-rule-width column-rule-style column-rule-color| initial|inherit;Property Values: column-rule-width: This value is used to set the width of the rule between the 3 min read CSS animation-duration Property The animation-duration property in CSS is essential for controlling the length of time an animation takes to complete one cycle, making it a vital tool for creating dynamic and engaging web designs.Syntax:animation-duration: time | initial | inherit;Property Value:time: This value is used to specify 3 min read CSS column-fill Property The column-fill property in CSS is used to specify whether the columns will be filled in a balanced manner or not.Syntax: column-fill: auto|balance|balance-all|initial|inherit;Default Value: balanceProperty Values: balance: This is the default value for the property. This value fills each column wit 3 min read CSS animation-timing-function Property The animation-timing-function property in CSS is used to specify how an animation makes transitions through keyframes. It defines the speed curve of the animation, determining how the intermediate keyframes are calculated and the pacing of the animation. Syntax: animation-timing-function: linear | e 4 min read Like