Using flexbox sticky footer with bootstrap

前端 未结 4 686
一整个雨季
一整个雨季 2021-02-14 09:58

I\'m trying to use this sticky footer:

http://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/

body{
  display: flex;
  min-height: 100vh;
          


        
4条回答
  •  一个人的身影
    2021-02-14 10:48

    You need to give the flexbox item a width of 100%.

    In this case, that would be that .content element:

    Updated Example

    body {
        display: flex;
        min-height: 100vh;
        flex-direction: column;
    }
    .content {
        flex: 1;
    }
    @media only screen and (max-width: 768px) {
        .content {
            width: 100%;
        }
    }
    

提交回复
热议问题