使div固定在底部居中
如何将div固定在底部?是经常会用到的样式。
<div class="footer">
我在中间 并且固定在底部
</div>
<style>
.footer{
position: fixed;
right: 0;
bottom: 0;
left: 0;
z-index: 1010;
height: 40px;
background: #fff;
border-top: 1px solid #eff1f7;
display: flex;
justify-content: center;
align-items: center;
}
</style>