Wednesday, May 2, 2012

Create Gradient with CSS

Here is an example of creating gradient with CSS

background: #f7f7f7; /* Old browsers */background: -moz-linear-gradient(top,  #f7f7f7 0%, #eff1f0 33%, #e3e3e3 73%, #dddddd 100%); /* FF3.6+ */background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f7f7f7), color-stop(33%,#eff1f0), color-stop(73%,#e3e3e3), color-stop(100%,#dddddd)); /* Chrome,Safari4+ */background: -webkit-linear-gradient(top,  #f7f7f7 0%,#eff1f0 33%,#e3e3e3 73%,#dddddd 100%); /* Chrome10+,Safari5.1+ */background: -o-linear-gradient(top,  #f7f7f7 0%,#eff1f0 33%,#e3e3e3 73%,#dddddd 100%); /* Opera 11.10+ */background: -ms-linear-gradient(top,  #f7f7f7 0%,#eff1f0 33%,#e3e3e3 73%,#dddddd 100%); /* IE10+ */background: linear-gradient(top,  #f7f7f7 0%,#eff1f0 33%,#e3e3e3 73%,#dddddd 100%); /* W3C */filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f7f7f7', endColorstr='#dddddd',GradientType=0 ); /* IE6-9 */

No comments:

Post a Comment