+ 1

Is it possible to use gradients for borders in css?

21st May 2018, 8:09 AM
Kasun Chaturanga
Kasun Chaturanga - avatar
4 Answers
+ 2
Kasun Chaturanga Gradient for border https://code.sololearn.com/W90zm525LAzF/?ref=app For browsers Firefox, Safari, Ghrome, Opera you need to add moz, webkit, o.
22nd May 2018, 8:18 AM
Olga
+ 5
gradients fill the inside of the element. borders surround the outside,so i dont know how this is possible
21st May 2018, 9:19 AM
᠌᠌Brains[Abidemi]
᠌᠌Brains[Abidemi] - avatar
+ 2
You can do it with border-image CSS prop.. Example : https://code.sololearn.com/WnABhbbtuC1x/ Note that not all browsers support it (and some specific value of sub-props) and its not very intuitive to use at begin... go here for details https://developer.mozilla.org/en-US/docs/Web/CSS/border-image
21st May 2018, 12:04 PM
KrOW
KrOW - avatar
+ 1
I don't think so. You can create a div and make gradient in it, make it thin as border, position it as the border of another div.
21st May 2018, 10:04 AM
Sachin Artani
Sachin Artani - avatar