15

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/

1 Answer 1

39

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.