2016年3月17日
摘要: 使用display:inline-block会出现的情况:1.使块元素在一行显示2.使内嵌支持宽高3.换行被解析了4.不设置的时候宽度由内容撑开5.在IE6,7下步支持块标签由于inline-block属性换行的时候被解析(有间隙)故解决方法使用浮动float:left/right使用浮动时出现的情 阅读全文
posted @ 2016-03-17 11:21 hduhdc 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 原因:盒子没有获得 haslayout 造成 margin-top无效 解决办法: 1、在父层div加上:overflow:hidden; 2、把margin-top外边距改成padding-top内边距 ; 3、父元素产生边距重叠的边有不为 0 的 padding 或宽度不为 0 且 style 阅读全文
posted @ 2016-03-17 10:33 hduhdc 阅读(542) 评论(0) 推荐(0) 编辑