Variable Visions

Articles CSS CSS-Gradients-in-all-browsers


tutorials - CSS and Web-Development.

CSS Gradients in all browsers

Published Wed. Sep. 19, 2012


 /*     WORKS IN FIREFOX, SAFARI, CHROME, OPERA, IE9,IE8,IE7   */

.gradient {
    background: -moz-linear-gradient(top, #333, #666);
    background: -webkit-gradient(linear, left top, left bottom, from(#333), to(#666));
    background-image: -o-linear-gradient(rgb(51,51,51),rgb(150,150,150));
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#666666');
    zoom: 1;
    /*     background: #333;  No fallback color needed...it will override the gradient in IE7 */

 

}


Tag(s): css gradients, filter, zoom