Joh*_*Del 12 javascript css jquery opacity raphael
我想为div创建一个线性透明渐变.有没有办法用jquery做到这一点?或者我应该使用像raphaeljs这样的其他库吗?我想达到如下效果:

Dus*_*ine 19
为什么不保持轻便和浏览器兼容.
div
{
backgroud-image: url('images/gradient.png');
background-repeat: repeat-x;
background-position: top right;
}
Run Code Online (Sandbox Code Playgroud)
Chr*_*nes 13
你可以用CSS3做到这一点:
例如
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+ */
}
Run Code Online (Sandbox Code Playgroud)
http://www.webdesignerwall.com/tutorials/cross-browser-css-gradient/
http://www.colorzilla.com/gradient-editor/
http://css-tricks.com/css3-gradients/
| 归档时间: |
|
| 查看次数: |
12972 次 |
| 最近记录: |