子元素在父元素中垂直、水平居中——四種方法

對父元素定位 1-父子元素進行定位,對子元素絕對定位,子元素margin:auto;top:0;left:0;bottom:0;right:0;  (定位佈局) <div style="width:200px;height:200px; border:solid blue; position:relative;">
相關文章
相關標籤/搜索