Modern way to markup 100% height layout in HTML5 and CSS3

前端 未结 8 1021
心在旅途
心在旅途 2021-02-02 11:49

I\'ve been away from marking up sites for some time. So, now we have HTML5 and a lot of new features in CSS. I have a common site layout with fixed size header and footer. And o

8条回答
  •  甜味超标
    2021-02-02 12:15

    As asking for "modern" AND "compatible" is a contraction anyway, the grid method wasn't mentioned so far, and maybe is too modern right now, but with some adaptions might be a solution.

    This article (and pointers) -with more complex use- is great to read: https://developers.google.com/web/updates/2017/01/css-grid

    Now the code looks nice, however browsers don't... - so I added some forcing.

    https://jsfiddle.net/qLcjg6L6/1/

    
    
    
    
    
    
    
    hdr
    main
    foot

提交回复
热议问题