CSS div水平垂直居中和div置于底部

时间:2021-04-16

  一、水平居中

.hor_center {
margin: 0 auto;
}

  二、水平垂直居中

<div class="content"></div>

.content {
width: 360px;
height: 240px;
}
.ver_hor_center {
position: absolute;
top: 50%;
left: 50%;
margin-left: -180px;
margin-top: -120px;
}

  三、div置于底部(footer)

.bottom_footer {
position: fixed;
bottom: 0px;
}

声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。

相关文章