最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Fade into black jQuery or Javascript effect? Exists? - Stack Overflow

programmeradmin0浏览0评论

Does there exist some kind of jQuery fade into black effect withing a specific part of a picture. So it really colors the picture into being black? I do know about the canvas element, but it just doesn`t seem like a good solution to me, would be grateful with some help :)

Does there exist some kind of jQuery fade into black effect withing a specific part of a picture. So it really colors the picture into being black? I do know about the canvas element, but it just doesn`t seem like a good solution to me, would be grateful with some help :)

Share Improve this question asked Mar 12, 2013 at 11:43 user2097217user2097217 4171 gold badge9 silver badges17 bronze badges 0
Add a ment  | 

1 Answer 1

Reset to default 7

applying an overlay to the picture ( an absolutely positioned DIV ), and adding opacity: 0 and background-color: black will make a transparent overlay. You can then animate the opacity to 1, basically "darkening" the image progressively.

Edit: here's a fiddle with a demo http://jsfiddle/FMSKf/

发布评论

评论列表(0)

  1. 暂无评论