Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add multiple css gradient as a multiple background?

Tags:

css

I want to make a button like this without using image by gradients as multiple background. is it possible?

enter image description here

using single element

<span class="customStyleSelectBox">Dummy Text</span>

Try at jsfiddle here http://jsfiddle.net/Awf6s/2/

like image 722
Jitendra Vyas Avatar asked Nov 24 '11 07:11

Jitendra Vyas


1 Answers

You can define multiple gradients comma-separated. E.g.:

.customStyleSelectBox {
    ...
    background: linear-gradient(#fff, #999) no-repeat border-box, linear-gradient(#eee, #777) no-repeat border-box;
    background-size: 98px 50px, 18px 50px;
    background-position: 0 0, 98px 0;
    background-origin: padding-box, padding-box;
}

Also see your updated jsfiddle.

like image 193
scessor Avatar answered Oct 03 '22 00:10

scessor