DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Mike has posted 9 posts at DZone. View Full User Profile

CSS Gradients

12.31.2009
| 2416 views |
  • submit to reddit
        // Gradient code for FF, Safari, Chrome, and IE.  Not Opera.
// Swiped from http://www.phpied.com/css-performance-ui-with-fewer-images/

.hd {background-image: -moz-linear-gradient(top, #641d1c, #f00);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#641d1c), to(#f00));
  filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#ff641d1c,endColorstr=#ffff0000);
  -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#ff641d1c,endColorstr=#ffff0000)";
}