Html 放置一个<;部门>;另一方面<;部门>;
我希望包含内容持有者的div部分覆盖包含建筑图像的divHtml 放置一个<;部门>;另一方面<;部门>;,html,css,Html,Css,我希望包含内容持有者的div部分覆盖包含建筑图像的div <div style=" background-position: -23px; height: 247px; background-image: url('/6.jpg'); background-repeat: no-repeat; "></div> <div style=" min-height: 450px; width:100%;" align="center" > <div style
<div style=" background-position: -23px; height: 247px; background-image: url('/6.jpg'); background-repeat: no-repeat; "></div>
<div style=" min-height: 450px; width:100%;" align="center" >
<div style=" width:85%; margin-top:200 ">
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</div>
我用这个
#overlay {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background-color: #333333;
//Cross-browser opacity below
-moz-opacity:.80;
filter:alpha(opacity=80);
opacity:.80;
z-index: 10000000;
}
我使用标签位置:绝对在内容上,我想这样移动:
#contentholder{
position: absolute;
margin-left: 100px
margin-top: 200px
}
但是,要使边距与您希望内容的去向相关。我们需要了解有关这些div的更多信息。第一个答案给出了
fixed
positioning作为解决方案,但这只是当您想在窗口窗格中修复某些内容时(与某些父容器的上下文相反)。#overlay{position:fixed;left:0;right:0;top:0;bottom:0;}我使用了这么多,而且很有效..thnxbut position fixed,滚动条不会出现在浏览器中。当位置为“绝对”时会发生。