CSS:在图像周围创建白光 [英] CSS: create white glow around image
本文介绍了CSS:在图像周围创建白光的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用简单的CSS3(不支持)?
How can I create a white glow as the border of an unknown size image?
推荐答案
in IE< 9)
Use simple CSS3 (not supported in IE<9)
img
{
box-shadow: 0px 0px 5px #fff;
}
这样会使文档中的每个图片都出现白光,选择器来选择你想要发光的图像。您可以更改课程的颜色:)
This will put a white glow around every image in your document, use more specific selectors to choose which images you'd like the glow around. You can change the color of course :)
如果您担心没有最新版本浏览器的用户,请使用:
If you're worried about the users that don't have the latest versions of their browsers, use this:
img
{
-moz-box-shadow: 0 0 5px #fff;
-webkit-box-shadow: 0 0 5px #fff;
box-shadow: 0px 0px 5px #fff;
}
对于IE,您可以使用辉光过滤器(不确定哪些浏览器支持它)
For IE you can use a glow filter (not sure which browsers support it)
img
{
filter:progid:DXImageTransform.Microsoft.Glow(Color=white,Strength=5);
}
使用设置播放以查看适合您的情况:)
Play with the settings to see what suits you :)
这篇关于CSS:在图像周围创建白光的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文