Jquery 淡入淡出渐变背景
我正在尝试寻找一种淡化渐变背景的方法。 我已经使用了颜色插件,我可以淡化单色背景,或者可以突出显示背景的 JqueryUI,但我找不到淡化渐变背景的方法。有人知道该怎么做吗?
.bg1
{
background:#f39d1a;
background:-moz-radial-gradient(50% 0% 164deg,circle closest-corner, #F39D1A, #D98C15);
background:-webkit-gradient(radial, 50% 0, 800, 50% 0, 300, from(#DA8C16), to(#F39D1A));
}
.bg2
{
background:#06327b;
background:-moz-radial-gradient(50% 0% 164deg,circle closest-corner, #032358, #06327b);
background:-webkit-gradient(radial, 50% 0, 800, 50% 0, 300, from(#032358), to(#06327b));
}
示例...将具有 bg1 元素的 div 动画化为 bg2 元素。
谢谢
i'm trying to look a way to fade gradient background.
I've used the color plugin and i can fade single colors background, or JqueryUI that can highlight the background but i can't find a way to fade gradient backgrounds. Anyone have any idea how to do it ?
.bg1
{
background:#f39d1a;
background:-moz-radial-gradient(50% 0% 164deg,circle closest-corner, #F39D1A, #D98C15);
background:-webkit-gradient(radial, 50% 0, 800, 50% 0, 300, from(#DA8C16), to(#F39D1A));
}
.bg2
{
background:#06327b;
background:-moz-radial-gradient(50% 0% 164deg,circle closest-corner, #032358, #06327b);
background:-webkit-gradient(radial, 50% 0, 800, 50% 0, 300, from(#032358), to(#06327b));
}
Example... animate a div that has the bg1 element to the bg2 element.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Webkit 还没有出现。但看起来他们已经走了很远了。
https://bugs.webkit.org/show_bug.cgi?id=21725
最近提交的感兴趣的变更列表。
http://trac.webkit.org/changeset/102388
解决方法可能是使用渐变从透明褪色到有颜色。将其放在非渐变元素之上,您实际上可以在其上执行彩色动画。也就是说,我不确定这是否能满足您的需求。
Webkit is not there quite yet. But it looks like they have come pretty far.
https://bugs.webkit.org/show_bug.cgi?id=21725
Recently commited changelist of interest.
http://trac.webkit.org/changeset/102388
A workaround could be to use a gradient that fades from transparent to a color. Put that on top of a non-gradient element upon which you actually can perform a color animation. That said, I'm not sure that would satisfy your needs.