Full height and full width CSS layout

前端 未结 4 1915
清歌不尽
清歌不尽 2021-02-02 00:47

I am looking for a way to create a CSS-only (no JavaScript) layout with 5 regions that looks like this:

   ┌────────────────────┐
   │          H         │
   ├─         


        
4条回答
  •  时光取名叫无心
    2021-02-02 01:28

    There's no easy way to get an element to fill a given depth exactly when using percentage measurements.

    You could get close by anchoring the footer at the window bottom, then - if cols A and C both share a background colour but col B's background differs, set your body (or container div if present) background colour to match cols A + C to seamlessly fill the gaps beneath of those columns if they're shorter than col B.

提交回复
热议问题