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

要实现如图的布局,我最先想到是将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 학습자의 빠른 성장을 도와주세요!