创建线性透明渐变到div [英] Creating a linear transparent gradient to a div

查看:260
本文介绍了创建线性透明渐变到div的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为div创建线性透明渐变。有什么办法用jquery做到这一点吗?还是应该使用其他一些类似raphaeljs的库?我想实现像下面的效果:

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:

推荐答案

为什么不保持轻便和兼容浏览器。

Why not keep it light and browser compatible.

div
{
    backgroud-image: url('images/gradient.png');
    background-repeat: repeat-x;
    background-position: top right;
}

这篇关于创建线性透明渐变到div的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆