【发布时间】:2018-08-10 06:03:14
【问题描述】:
我在<body> 中使用AdminLTE 和sidebar-collapse fixed,并尝试修复内容标题。所以它会像标题一样浮动。这里是 HTML 代码:
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header row">
<h1 class="col-md-6">
Master Satuan
</h1>
<div class="col-md-6 text-right">
<button id="batchDelete" class="btn btn-danger mx-1">
<i class="fa fa-trash"></i> Delete
</button>
<button id="btnAdd" class="btn btn-success mx-1" href="#">
<i class="fa fa-plus"></i> Add
</button>
</div>
</section>
<!-- Main content -->
<section class="content">
<!-- Content here ->
</section>
</div>
我尝试用position: fixed 修改css content-header,但标题隐藏在主要内容的后面。并尝试通过w3c 滚动固定标题但没有运气,因为标题仍然隐藏在主要内容的后面。其实我只是想在主标题之后有一个固定的位置。我怎样才能做到这一点?
【问题讨论】:
-
你试过z-index了吗?
-
@DomenikReitzner 还没有,让我试试看
标签: html css twitter-bootstrap-3 adminlte