html css div固定底部

<div id=”father”>

  <footer></footer>

</div>

#father{

position:relative; //父元素加入相对定位  不加则固定到html底部

}

footer { position: absolute;  //绝对定位 bottom: 0; left: 50%;  //水平居中 transform: translate(-50%, 0%); //调整位置 }