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

这是工作小提琴

更多相关文章

  1. 每次在HTML5中加载静态图像
  2. Javascript来自数据库的图像上的图像映射
  3. python 简单图像处理(2) 镜像
  4. caffe python批量抽取图像特征
  5. 在Python中显示来自控制台的图像
  6. Python为8bit深度图像应用color map
  7. Tensorflow:恢复图形和模型,然后在单个图像上运行评估
  8. python的PIL绘制多行文本的图像。
  9. 铯:使用自己的OpenStreetMap服务器。:“未能获得图像块”错误

随机推荐

  1. Android仿真器远程登录模式(telnet)
  2. 二、android百度地图定位显示当前位置(an
  3. Android实现全屏显示的方法
  4. Android常用控件六之图片框(ImageView)
  5. 使用Android adb命令来启动Android应用程
  6. Android: Java的ClassLoader和Android的C
  7. [Android] 基于 Linux 命令行构建 Androi
  8. android设备上运行i-jetty服务
  9. android 应用内悬浮框,并在指定页面显示
  10. Android Studio 简单介绍和使用问题小结