摘要: <div style="margin:0 auto;width:200px;"> <input class="submit" id="btn" type="submit" value="注册" /> </div> 给div赋予input一样的宽度,然后给父div水平居中。 阅读全文
posted @ 2017-06-05 10:30 摘星捧月 阅读(10001) 评论(0) 推荐(0) 编辑
摘要: 摘自 http://www.cnblogs.com/wennice/p/6422965.htm (objectBao) 使用letter-space后和上面的字体对l比明显没有居中; 选定元素后发现,每个字后面都被加了2em,不是不能居中而是因为多了最后一个字的2em,所以向左多对齐了2em。 解决 阅读全文
posted @ 2017-06-05 10:22 摘星捧月 阅读(313) 评论(0) 推荐(0) 编辑