Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个像这样固定的 div
.div1{ position:fixed; }
我还有另一个 div 我想低于我这样编码的这个 div
.div2{ postion:relative; }
div2 紧跟在 div1 后面。我需要定位第二个div吗?像这样。。
top:(number of pixels of first div)px;
close - 使用 margin-top 而不是 top
margin-top:(number of pixels of first div)px;