css---前端開發中,如何使盒子水平垂直居中?

一、使用margin負值 css部分css .box{ position:relative; width:600px; height:400px; } .item{ height:100px; width:100px; position:absolute; top:50%; left:50%; margin-left:-50px; margin-top:-50px; } html部分:html <
相關文章
相關標籤/搜索