I'd like to create a linear transparent gradient to a div. Is there any way to do that with jquery? Or should I use some other library like raphaeljs? I'd like to achieve an effect like the following:
A:
Not sure what exactly you are looking for but take a look at Gradienter jQuery plugin.
Sarfraz
2010-10-28 17:07:04
+8
A:
You can do it with CSS3:
E.g.
div {
opacity: 0.5;
background: #999; /* for non-css3 browsers */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#cccccc', endColorstr='#000000'); /* for IE */
background: -webkit-gradient(linear, left top, left bottom, from(#ccc), to(#000)); /* for webkit browsers */
background: -moz-linear-gradient(top, #ccc, #000); /* for firefox 3.6+ */
}
http://www.webdesignerwall.com/tutorials/cross-browser-css-gradient/
Christian
2010-10-28 17:09:37