zoukankan      html  css  js  c++  java
  • css sticky footer: 完美的CSS绝对底部

    当做一个页面时,如果页面内容很少,不足于满屏时,不会留下大片空白,底部层“detail-close” 在屏幕底部定位;
                 如果页面内容超于屏幕高度,底部层“detail-close” 不会被重叠,被内容顶下去,在页面底部

    HTML:

    <div class="detail" v-show="detailShow" @click="detailShow = false">
    <div class="detail-wrapper clearfix">
    <div class="detail-main"></div> <!--内容层 -->
    </div>
    <div class="detail-close">
    <i class="icon-close"></i> <!--图标 -->
    </div>
    </div>

    CSS:

    .detail
    position :fixed
    z-index :100
    width :100%
    height :100%
    top :0
    bottom :0
    overflow :auto
    background :rgba(7,17,27,0.8)
    .detail-wrapper
    min-height :100%
    .detail-main
    margin-top :64px
    padding-bottom :64px
    .detail-close
    position :relative
    width :32px
    height 32px
    margin :-64px auto 0 auto
    clear :both
    font-size 32px
    
    
  • 相关阅读:
    chkconfig命令
    PHP中的WebService
    MySQL 中联合查询效率分析
    javascript中json对象长度
    Replace Pioneer
    c++ 调用matlab程序
    ubuntu 安装 sublime
    一些地址收藏
    学习笔记草稿
    Redis Cluster 集群使用(3)
  • 原文地址:https://www.cnblogs.com/myRain/p/7985424.html
Copyright © 2011-2022 走看看