absolute之整体布局实现
ringa_lee
ringa_lee 2016-10-24 10:23:14
0
0
1148

要实现如图的布局,我最先想到是将header与footer绝对定位,但是发现在移动端会出现bug,经查资料发现用absolute实现整体布局非常好,还挺简单的。

.header, .footer, .content { 
      position: absolute; 
      left: 0; 
      right: 0; 
}.header {
    height: 48px; 
    top: 0; 
    z-index: 1; 
   /*other style*/  }.footer { 
    height: 52px; 
    bottom: 0;
    z-index: 1; 
    /*other style*/  }.content { 
    top: 48px; 
    bottom: 53px; 
    overflow: auto; 
   /*other style*/ 
 }


ringa_lee
ringa_lee

ringa_lee

全員に返信(0)
人気のチュートリアル
詳細>
最新のダウンロード
詳細>
ウェブエフェクト
公式サイト
サイト素材
フロントエンドテンプレート
私たちについて 免責事項 Sitemap
PHP中国語ウェブサイト:福祉オンライン PHP トレーニング,PHP 学習者の迅速な成長を支援します!