Want to add a linear gradient effect on your web content? Now you can do so with CSS!
- Webkit browsers (e.g., Safari, Chrome)
-
background: -webkit-gradient(linear, starting point, ending point,
starting color, ending color); - For example –
.gradient {background: -webkit-gradient(linear, left top, right bottom, from(#000), to(#900);>
-
- Gecko browsers (e.g., Firefox)
-
background: -moz-linear-gradient(starting point, starting color, ending color); -
For example –
-
- Internet Explorer
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='starting color', endColorstr='ending color');
- For example –
.gradient {filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#000000', endColorstr='#990000');>
-
Want to learn more great Cascading Style Sheets tips? Come take one of our CSS classes:
- CSS1: Styling Your Site with Cascading Style Sheets on July 29 and August 9
- CSS2: Using Cascading Style Sheets for Page Layout on August 10 and August 24
- CSS3: Implementing the New Features (Lecture) on August 17
Tags: cascading style sheets, css



