本文介绍了CSS浮动内联元素(960 GS)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





只是想知道目的是什么

解决方案

float:left 被强制具有计算显示



有关详情,请参阅:



添加 display:inline 的目的是修复 IE6错误,双边距错误:



没有缺点(即使在IE6中):


I was just checking out 906.gs css code and noticed that they made all the floated divs inline.

http://960.gs/demo.html

Just wondering what the purpose of that is...I am always interested in learning CSS theories.

解决方案

An element with float: left is forced to have a computed display value of block.

For more information on that, see: jQuery in Chrome returns "block" instead of "inline"

The purpose of also adding display: inline is to fix an IE6 bug, the "double margin bug":

http://www.positioniseverything.net/explorer/doubled-margin.html

It's a free fix with no downsides (even in IE6):

这篇关于CSS浮动内联元素(960 GS)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 03:37
查看更多