Sticky footer in Angular 2 Material

后端 未结 3 1672
我在风中等你
我在风中等你 2021-02-09 00:00

I have been searching and searching for about 3 hours now because I didn\'t want to have to ask, but how can I keep a \'footer\' variable at the bottom but not like fixed at the

3条回答
  •  臣服心动
    2021-02-09 00:41

    The answer can be found here: Sticky footer at the bottom in Angular 2

    Solution

    app {
      min-height: 100%;
      width: 100%;
      margin-bottom: -271px;
      display: table;
    }
    
    header-main,
    router-outlet,
    footer{
      display: table-row;
    }
    
    header-main {
     height: 60px;
    }
    
    router-outlet {
      position: absolute;
    }
    
    footer {
      height: 271px;
    }
    

提交回复
热议问题