試試這在Internet Explorer以及..
.box-shadow {
-moz-box-shadow: 0 5px 10px #ccc;
-webkit-box-shadow: 0 5px 10px #ccc;
box-shadow: 0 5px 10px #ccc;
zoom: 1;
filter:
progid:DXImageTransform.Microsoft.Shadow(color=#dddddd,direction=0,strength=1),
progid:DXImageTransform.Microsoft.Shadow(color=#dddddd,direction=45,strength=1),
progid:DXImageTransform.Microsoft.Shadow(color=#dddddd,direction=90,strength=2),
progid:DXImageTransform.Microsoft.Shadow(color=#dddddd,direction=135,strength=3),
progid:DXImageTransform.Microsoft.Shadow(color=#cccccc,direction=180,strength=10),
progid:DXImageTransform.Microsoft.Shadow(color=#dddddd,direction=225,strength=3),
progid:DXImageTransform.Microsoft.Shadow(color=#dddddd,direction=270,strength=2),
progid:DXImageTransform.Microsoft.Shadow(color=#dddddd,direction=315,strength=1);
}
body:last-child .box-shadow {
/* Remove filter from IE9 */
filter: none;
}
.demo {
background: #fff;
border: solid 1px #ccc;
color: #555;
font: 83%/130% arial;
margin: 20px;
padding: 20px;
}
<div class="demo box-shadow">
Lorem ipsum dolor sit amet, consectetur adipisicing
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad mi
quis nostrud exercitation ullamco laboris nisi ut aliquip
</div>
嘗試這個FIDDLE
顏色相當於'#d9d9d9'參見http://www.javascripter。 net/faq/rgbtohex.htm – fcalderan
http://caniuse.com/#search=box-shadow –