1. 程式人生 > >按鈕固定在頁面頂部

按鈕固定在頁面頂部

頁面 spl flow otto after color -s -h blog

<div class="detail">
    <div class="detail-wrapper clearfix">
        <div class="detail-main">
        </div>
    </div>
    <div class="detail-close">
        <i class="fa fa-close"></i>
     </div>
</div>
.detail {
    position: fixed;
    top
: 0; left: 0; z-index: 999; width: 100%; height: 100%; overflow: auto; } .detail-wrapper { width: 100%; min-height: 100%; } .detail-main { margin-top: 64px; padding-bottom: 64px; } .detail-close { position: relative; width: 32px; height: 32px; margin: -64px auto 0
; clear: both; font-size: 32px; } .clearfix { display: inline-block; } clearfix:after { display: block; content: "."; height: 0; line-height: 0; clear: both; visibility: hidden; }

按鈕固定在頁面頂部