Html 相对div位于顶部的固定div之下

Html 相对div位于顶部的固定div之下,html,tags,overlap,Html,Tags,Overlap,我有一个像这样固定的div .div1{ position:fixed; } .div2{ postion:relative; } 我还有另一个div,我想降到比这个div更低的位置,我这样编码的 .div1{ position:fixed; } .div2{ postion:relative; } 第二组就在第一组后面。我需要定位第二个div吗?就这样 top:(number of pixels of first div)px; 关闭-使用边

我有一个像这样固定的div

.div1{
     position:fixed;
}
.div2{
     postion:relative;
}
我还有另一个div,我想降到比这个div更低的位置,我这样编码的

.div1{
     position:fixed;
}
.div2{
     postion:relative;
}
第二组就在第一组后面。我需要定位第二个div吗?就这样

 top:(number of pixels of first div)px;

关闭-使用边距顶部而不是顶部

margin-top:(number of pixels of first div)px;

关闭-使用边距顶部而不是顶部冷却。将发表评论作为答案。