摘要: 一、脱离文档流元素的居中 只可用于定宽高元素; 方法一:margin:auto法 方法二:负margin法 父元素设置为:position: relative; 子元素设置为:position: absolute; 距上50%,据左50%,然后减去元素自身宽度的距离就可以实现 top:50%;lef 阅读全文
posted @ 2018-08-03 12:00 sunmarvell 阅读(271) 评论(0) 推荐(0) 编辑