61,115
社区成员
发帖
与我相关
我的任务
分享
#fixed {
background-color:red;
width:100px;
height:100px;
top:50px;
right:20px;
display:block;
position:absolute;
z-index:5;
}
#fixed .shadow{
position:absolute;
top:2px;
left:2px;
display:block;
width:101%;
height:101%;
background-color:#555;
z-index:4;
}
<div id="fixed">
<ul>
<li>asfasfsd</li>
</ul>
<div class="shadow"></div>
</div>
<div style="position:absolute;left:50%;top:300px;border-top:1px solid #d6d3ce;border-left:1px solid #d6d3ce;border-right:1px solid #424142;border-bottom:1px solid #424142;" >
<div style="background-color:#d6d3ce;width:300px;height:200px;border-top:1px solid #ffffff;border-left:1px solid #ffffff;border-right:1px solid #848284;border-bottom:1px solid #848284;" >
some text
</div>
</div>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
#fixed {
background-color:#555;
width:100px;
height:100px;
top:50px;
right:20px;
display:block;
position:absolute;
z-index:5;
}
#fixed .shadow{
position:absolute;
top:2px;
left:2px;
display:block;
width:101%;
height:101%;
background-color:red;
z-index:4;
}
</style>
</head>
<body>
<div id="fixed">
<ul>
<li>asfasfsd</li>
</ul>
<div class="shadow"></div>
</div>
</body>
</html>
#fixed {
width:100px;
height:100px;
top:50px;
right:20px;
position:absolute;
}
#fixed .shadow{
position:absolute;
top:2px;
left:2px;
width:101%;
height:101%;
background-color:#555;
z-index:-1;
}
#fixed ul {
list-style: none;
margin: 0px;
padding: 0px;
top:50px;
right:20px;
width: 100%;
height: 100%;
background-color: red;
}