码迷,mamicode.com
首页 > Web开发 > 详细

css深入理解之margin

时间:2016-07-14 02:51:53      阅读:170      评论:0      收藏:0      [点我收藏+]

标签:

margin:auto;实现垂直居中

代码:
http://jsbin.com/gesupehoxa/edit?html,css,output

绝对定位absolute与margin实现上下左右居中(仅支持IE8+)
http://jsbin.com/xucarafaji/edit?html,css,output

CSS margin负值定位
技术分享
解决方案:
http://jsbin.com/kecocisude/edit?html,css,output

margin负值定位的巧妙用法2:(IE6都支持)
填充空余区域:
技术分享
http://jsbin.com/gorekeviyo/edit?html,css,output

 

css深入理解之margin

标签:

原文地址:http://www.cnblogs.com/lqcdsns/p/5668434.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!