Flexbox with fixed header and footer and scrollable content

后端 未结 2 1223
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-05 15:52

I am trying to make a flexbox design work. I am not an HTML/css expert. :(

I have a flexbox design with fixed header and footer and content that occupies the rest of

2条回答
  •  生来不讨喜
    2020-12-05 16:41

    It sounds like what you want are multiple elements in the content section that basically take up the entire page in size, but that you can scroll through.

    Let's call these elements in the content section "slide"s.

    The easiest way to achieve this would be to set the minimum dimensions of these elements, something like -

    .content .slide {
      min-width:100vw;
      min-height:100vh;
    }
    

    This will make sure, even if the content within the slide's doesn't take up the entire space, it will remain at full size.

提交回复
热议问题