css中的盒阴影的使用
我们可以利用阴影做出一些立体或者看起来动态的效果。
语法
box-shadow: h-shadow v-shadow blur spread color inset;
实例内部阴影和外部阴影
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
.inner {
width: 300px;
height: 50px;
line-height: 50px;
margin: 100px auto;
border: 1px solid #ddd;
text-align: center;
box-shadow: inset 0 0 10px #000;
}
.outer {
width: 300px;
height: 50px;
line-height: 50px;
margin: 260px auto;
border: 1px solid #ddd;
text-align: center;
box-shadow: 0 0 10px #000;
}
</style>
</head>
<body>
<div class="inner">哈哈哈哈哈哈哈哈哈哈哈啊哈哈</div>
<div class="outer">哈哈哈哈哈哈哈哈哈哈哈啊哈哈</div>
</body>
</html>
加油吧!IT人