CSS border-image-slice Property
CSS border-image-slice Property
CSS border-image-slice
property specifies how to slice the image specified by border-image-source.
Note: The slicing process creates nine regions in total: four corners, four edges and the middle.
Example
Syntax
Using CSS
Using Javascript
Animatable
No, border-image-slice property is not animatable. CSS Animatable Properties Reference.
Default Value
Default value for CSS border-image-slice property is 100%.
Property Value
The following table provides a list of values for CSS border-image-slice
property.
Value | Explanation |
---|---|
Number | A number in pixels for raster images and coordinates for vector images. |
% | Specifies a percentage of the source image's size. |
fill | Preserves the middle image region and displays it like a background image, but stacked above the actual background. |
Using JavaScript
In the following example, we will demonstrate how to change the CSS border-image-slice
property of an element using JavaScript.
Example
Reminder
Hi Developers, we almost covered 98.7% of CSS Tutorials with examples for quick and easy learning.
We are working to cover every Single Concept in CSS.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.