微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

图像模糊与CSS/Javascript:是可能吗?

是否可以使用CSS和Javascript添加模糊效果到图像?

解决方法

是的, this works a treat

Pixastic is an experimental library which allows you to perform a variety of operations on images using just a bit of JavaScript. The effects supported out of the Box include desaturation/greyscale,invert,flipping,brightness/contrast adjustment,hue/saturation,emboss,blur,and many more…

Pixastic works by utilizing the HTML5 Canvas element which provides access to raw pixel data,thereby opening up for more advanced image effects. This is where the “experimental” part comes into play. Canvas is only supported by some browsers and unfortunately Internet Explorer is not one of them. It is however well supported in both Firefox and Opera and support for Safari only just arrived with the recent Safari 4 (beta) release. Chrome currently works in the dev channel. A few of the effects have been simulated in IE using the age old proprietary filters. While these filters are much faster than their Canvas friends,they are few and limited. Hopefully we will one day have real Canvas on IE as well…

原文地址:https://www.jb51.cc/css/218780.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。