在透明背景PNG周围获得“方形”框阴影。如何在图像周围弯曲css阴影? [重复]
Possible Duplicate:
Can you add a non-square drop shadow to PNG content with CSS?可能重复:您可以使用CSS为PNG内容添加非方形投影吗?
Thanks for checking out my question.
谢谢你查看我的问题。
Having an issue where by I am setting the hover of an image in css to have a box-shadow:
有一个问题,我在css中设置图像的悬停有一个盒子阴影:
But the shadow is a square around the image, rather than following the path around the guy in the picture.
但阴影是图像周围的正方形,而不是跟随图片中的人的路径。
The image is a PNG-24 with a transparent background. Am I making a stupid mistake somewhere? Can this actually be done or do I need to somehow remove the square canvas from within Photoshop or swap out the image for the same one with a shadow via javascript?
图像是PNG-24,背景透明。我在某个地方犯了一个愚蠢的错误吗?这可以实际完成或者我是否需要以某种方式从Photoshop中删除方形画布或通过javascript将图像替换为带有阴影的相同图像?
Many thanks for any suggestions :)
非常感谢任何建议:)
1 个解决方案
#1
9
its not possible with CSS. Use image sprite & change background position on hover.
它不可能与CSS。使用图片精灵并在悬停时更改背景位置。
Here is the working fiddle
这是工作小提琴
更多相关文章
- 每次在HTML5中加载静态图像
- Javascript来自数据库的图像上的图像映射
- python 简单图像处理(2) 镜像
- caffe python批量抽取图像特征
- 在Python中显示来自控制台的图像
- Python为8bit深度图像应用color map
- Tensorflow:恢复图形和模型,然后在单个图像上运行评估
- python的PIL绘制多行文本的图像。
- 铯:使用自己的OpenStreetMap服务器。:“未能获得图像块”错误