The box-shadow property of CSS3 allows us to easily achieve layer shadow effects. Let’s explain this attribute in detail in practice.
Let’s first look at the browser compatibility of this attribute:
box-shadow has six settable values:
img{box-shadow: Shadow type X-axis displacement Y-axis displacement shadow size shadow extension shadow color}
Let us look at the effect of a box-shadow through several examples. First, make a simple html for testing:
<html>
<head>
<style type="text/css">Write the CSS part here</style>
</head>
<body>
<img src="test.jpg" />
</body>
</html>
Please note : To save trouble, only box-shadow is written in the CSS code below. In actual use, you should also write -moz-box-shadow and -webkit-shadow. What you need to do is very simple, copy two box-shadows and add -moz- and -webkit- in front of them.
img {
-moz-box-shadow:2px 2px 10px #06C;
-webkit-box-shadow:2px 2px 10px #06C;
box-shadow:2px 2px 10px #06C;
}