Is there a way to use CSS3 gradients and return to PNG?

How to use CSS3 gradients for background image and discard PNG image if gradients are not supported?

+4
source share
1 answer

Here you go.

A browser that does not support CSS3 gradients just uses an image.

div { background-color: #1a82f7; /* fallback color */ background-image: url(images/linear_bg_2.png); /* fallback image */ background-image: -moz-linear-gradient(100% 100% 90deg, #2F2727, #1a82f7); background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#1a82f7), to(#2F2727)); } 

Blog post about this in CSS tricks

+13
source

All Articles