I am trying to create a button using CSS gradients plus an icon that sits on top of the gradient. I tried two methods, and both were unsuccessful.
Firstly:
.btn {
background: -webkit-gradient(linear, 0% 0%, 0% 89%, from(#3171CA), to(#15396F));
background: url(../images/btn.png);
}
I should have known this didn't work! But I also heard about several CSS3 background images, so I tried it like this.
The second:
.btn {
background: -webkit-gradient(linear, 0% 0%, 0% 89%, from(#3171CA), to(#15396F)), url(../images/btn.png);
}
Still not working :(. Is there really a way? With the tag added <img>in <button>?
source
share