可以在透明背景PNG图像上创建CSS阴影? [英] Possible to create a css shadow on transparent background PNG image?

查看:313
本文介绍了可以在透明背景PNG图像上创建CSS阴影?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都知道是否可能在透明背景PNG图片上创建基于CSS的阴影?



也许使用CSS3,jquery或最后的服务器端? >

我想要实现的效果示例:





确定如果可能,它不会是跨浏览器,但愿如果降级

解决方案



请随意添加您的输入, >

如果将图片加载到画布上下文中,您可以执行此操作。



这里有很好的清洁源:



http://philip.html5.org/demos/canvas/shadows /various.html


Anyone know if its possible to yet create a css based drop shadow on transparent background PNG image?

Perhaps with CSS3,jquery or lastly server side?

Example after effect of what I am trying to acheive :

Pretty sure if it is possible it wouldn't be cross browser but willing to apply if it degrades well?

Feel free to add you input , open techniques discussion ..

解决方案

If you load the image in to a canvas context you can do this.

good clean source here:

http://philip.html5.org/demos/canvas/shadows/various.html

这篇关于可以在透明背景PNG图像上创建CSS阴影?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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