内部阴影到IE中的div [英] Inner shadow to div in IE
问题描述
我为div创建了一个内部阴影,如下面的css代码:
.gil_Help_ContentArea {
width :300px;
height:200px;
margin:5px 0 0 0;
padding:0px;
background-color:#fff;
box-shadow:inset 0 0 10px #ccc;
-moz-box-shadow:inset 0 0 10px #ccc;
-webkit-box-shadow:inset 0 0 10px #ccc;
-khtml-box-shadow:inset 0 0 10px #ccc;
}
它与IE以外的浏览器兼容,但我想要的效果相同在IE。
您可以在 http://jsfiddle.net/shabirgilkar/Mu9jL/ 。
t支持 box-shadow
CSS3属性,但它可能可以让它工作。您应该检查这些文章...
- http://dev.opera.com/articles/view/cross-browser-box-shadows/
- http://dimox.net/cross-browser-css3-box-shadow/
- http://fetchak.com/ie-css3/
ul>
我建议使用IE 8及以下版本的图片(使用条件样式表)。
解决方案,但它适用于IE 8,Chrome,Firefox,Safari和Opera。查看小提琴...
http://jsfiddle.net / UnsungHero97 / Mu9jL / 3 /
我希望这有助于。
Hristo
I created an inner shadow for a div as in the following css code:
.gil_Help_ContentArea {
width: 300px;
height: 200px;
margin: 5px 0 0 0;
padding: 0px;
background-color: #fff;
box-shadow: inset 0 0 10px #ccc;
-moz-box-shadow: inset 0 0 10px #ccc;
-webkit-box-shadow: inset 0 0 10px #ccc;
-khtml-box-shadow: inset 0 0 10px #ccc;
}
It is working fine with browsers other than IE, but I want the same effect in IE. If anybody is willing to help, it will be appreciated.
You can check the effect at http://jsfiddle.net/shabirgilkar/Mu9jL/.
IE 8 and below don't support the box-shadow
CSS3 property, but it might be possible to get it to work. You should check these articles out...
- http://dev.opera.com/articles/view/cross-browser-box-shadows/
- http://dimox.net/cross-browser-css3-box-shadow/
- http://fetchak.com/ie-css3/
I would recommend using images for IE 8 and below (use conditional stylesheets).
I came up with a crappy solution, but it works in IE 8, Chrome, Firefox, Safari, and Opera. Check out the fiddle...
http://jsfiddle.net/UnsungHero97/Mu9jL/3/
I hope this helps.
Hristo
这篇关于内部阴影到IE中的div的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!