我很好奇工作位置:如何在html标记中使用相对位置。谁能解释一下?它是相对于文档对象或类似的东西吗?将html设置为相对位置
<footer class="footer">
<div class="container">
<p class="text-muted">Place sticky footer content here.</p>
</div>
</footer>
html {
position: relative;
min-height: 100%;
}
body {
/* Margin bottom by footer height */
margin-bottom: 60px;
}
.footer {
position: absolute;
bottom: 0;
width: 100%;
/* Set the fixed height of the footer here */
height: 60px;
background-color: #f5f5f5;
}
为什么你不想阅读指南?这总是最好的选择。 https://www.w3schools.com/css/css_positioning.asp –
[这里](http://www.barelyfitz.com/screencast/html-training/css/positioning/)是学习CSS定位的好教程 – Lal
本教程的第4点向我解释了我想知道的很多 – quimak