【问题标题】:Fixed content-header in AdminLTE修复了 AdminLTE 中的内容标头
【发布时间】:2018-08-10 06:03:14
【问题描述】:

我在<body> 中使用AdminLTEsidebar-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>&nbsp;
            <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


【解决方案1】:

为您的标题设置posistion:fixed;z-index

并且,将position:absolute; 设置为主要内容。设置top: some pixel values

【讨论】:

    猜你喜欢
    • 2013-10-31
    • 1970-01-01
    • 1970-01-01
    • 2012-04-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-22
    相关资源
    最近更新 更多