你的位置:首页 > 网页设计

[网页设计]CSS实现网页顶部的阴影效果


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html <head>
<title>CSS网页顶部阴影代码</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body:before {
content:"";
position:fixed;
top: -10px;
left: 0;
width: 100%;
height: 10px;
z-index: 999;
box-shadow: 0 0 20px rgba(0,0,128,0.8);
}
</style>
</head>
<body>
<div>http://www.999jiujiu.com/</div>
</body>
</html>