<html>
<head>
<link href="hue.css" rel="stylesheet">
</head>
<body>
<div class="content">
<div class="column">
<div class="form">
<div class="form-nivel">
<label for="cfdiCreate:organizationRfc">RFC</label><label id="cfdiCreate:organizationRfc">XXXXXXXXXXXX</label>
</div>
<div class="form-nivel">
<label for="cfdiCreate:organizationTaxSystem">Regimen fiscal</label><label id="cfdiCreate:organizationTaxSystem">Sueldos y salarios</label>
</div>
<div class="form-nivel">
<label for="cfdiCreate:organizationTaxAddress">Domicilio fiscal</label><label id="cfdiCreate:organizationTaxAddress">XXXXXX Colonia Tecnológico Monterrey,Nuevo León,México.C.P.XXXXXX</label>
</div>
<div class="form-nivel">
<label for="cfdiCreate:organizationExpeditionPlace">Lugar de expedición</label><label id="cfdiCreate:organizationExpeditionPlace">Suc.1 Chiapas,México. </label>
</div>
</div>
</div>
<div class="column secondary">
<!--?xml version="1.0" encoding="UTF-8"?-->
</div>
</body>
</html>
position :fixed
使div
修复,但当我们向下滚动时,它与其他div
重叠。如何将此行固定在顶部,并且每当我们向下滚动时,不要让div
与另一个div
重叠。
答案 0 :(得分:1)
如果我想猜你想要什么(一个固定的顶部栏位于页面下方的内容/ div之上),就像这样:
.column {
position: fixed;
top: 0;
z-index: 10;
}
.secondary {
position: relative;
z-index: 5;
}
使用示例查看此CodePen,我已将代码缩短为仅包含必要位。