0

Gradient with transparency![enter image description here][1]

I wanted to apply transparent multicolor gradient at the bottom like the below picture. I've found few pages which explains this but still i'm unable to get it working properly.

I tried with this fiddle http://jsfiddle.net/QEhsG/2/ (found on stackoverflow) but im not able to get black and white combination perfectly.

Any help ?

1 Answer 1

3

Give alpha= 0 to your first rgba. Write like this

button {
    background-color: black;
    background-image: -webkit-linear-gradient(top, rgba(252, 252, 252, 0) 0%, rgba(186, 186, 186, 1) 100%);
    background-image: -moz-linear-gradient(top, rgba(252, 252, 252, 0) 0%, rgba(186, 186, 186, 1) 100%);
    width: 200px;
    height: 100px;
}

Check this http://jsfiddle.net/QEhsG/6/

UPDATED

http://jsfiddle.net/QEhsG/8/

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

1 Comment

thanks sandeep but when i use this it does it give me the effect what is needed it looks more like a block of element...

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.