CSS gradient background

With CSS3 you don’t have to use images to create nice gradient backgrounds, although not all browsers support this feature yet, why don’t take advantage of the browsers that do… Chrome, Safari, Firefox 3.6…. IE needs some special code, but even IE6 supports CSS gradient!


background:#ebd3ac; /* regular browsers that don't support this feature */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#feeed2', endColorstr='#ebd4ad'); /* IE */
background: -webkit-gradient(linear, left top, left bottom, from(#feeed2), to(#ebd4ad)); /* webkit (Chrome, safari) */
background: -moz-linear-gradient(top, #feeed2, #ebd4ad); /* firefox */
Advertisements
This entry was posted in css. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s