Is it possible to somehow apply a gradient to a border ?
It is desirable something simpler, if this of course is ...
Here is one of the options:
div { border-width: 3px; border-style: solid; -webkit-border-image: -webkit-gradient(linear, 0 0, 0 100%, from(black), to(rgba(0, 0, 0, 0))) 1 100%; -webkit-border-image: -webkit-linear-gradient(black, rgba(0, 0, 0, 0)) 1 100%; -moz-border-image: -moz-linear-gradient(black, rgba(0, 0, 0, 0)) 1 100%; -o-border-image: -o-linear-gradient(black, rgba(0, 0, 0, 0)) 1 100%; border-image: linear-gradient(to bottom, black, rgba(0, 0, 0, 0)) 1 100%; } <div style="width: 50px; height: 50px; background: #eee"></div> taken from CSS tricks
There are many alternatives.
Source: https://ru.stackoverflow.com/questions/539544/
All Articles