RE: RE: Vue.js实战笔记
You are viewing a single comment's thread from:

RE: Vue.js实战笔记

Words
16
Reading
1 min
Listen
Play
7y

完美解决HTML中footer保持在页面底部问题

//App.vue
  html,body{
    height: 100%;
  }
  #app{
    position:relative;
    width:100%;
    min-height:100%;
    padding-bottom: 4rem;
    box-sizing: border-box;
  }

//footer.vue
.myfooter{
    background-color: rgba(228,231,233,0.75);
    color: rgba(55,53,58,0.75);
    width: 100%;
    height: 4rem;
    padding-top: 1rem;
    padding-left: 3rem;
    padding-right: 3rem;
    position:absolute;
    bottom:0px;
  }