Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
625 views
in Technique[技术] by (71.8m points)

internet explorer - Inner shadow to div in IE

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/.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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...

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...