<bdo id='fMTrs'></bdo><ul id='fMTrs'></ul>

      1. <small id='fMTrs'></small><noframes id='fMTrs'>

        <legend id='fMTrs'><style id='fMTrs'><dir id='fMTrs'><q id='fMTrs'></q></dir></style></legend>
        <tfoot id='fMTrs'></tfoot>
        <i id='fMTrs'><tr id='fMTrs'><dt id='fMTrs'><q id='fMTrs'><span id='fMTrs'><b id='fMTrs'><form id='fMTrs'><ins id='fMTrs'></ins><ul id='fMTrs'></ul><sub id='fMTrs'></sub></form><legend id='fMTrs'></legend><bdo id='fMTrs'><pre id='fMTrs'><center id='fMTrs'></center></pre></bdo></b><th id='fMTrs'></th></span></q></dt></tr></i><div id='fMTrs'><tfoot id='fMTrs'></tfoot><dl id='fMTrs'><fieldset id='fMTrs'></fieldset></dl></div>

        为什么 bootstrap 在 .span 上使用浮点数而不是 display: inline-block?

        why bootstrap uses floats on .span instead of display: inline-block?(为什么 bootstrap 在 .span 上使用浮点数而不是 display: inline-block?)

              <tfoot id='JzipD'></tfoot>
                <tbody id='JzipD'></tbody>
                <bdo id='JzipD'></bdo><ul id='JzipD'></ul>

                <small id='JzipD'></small><noframes id='JzipD'>

              • <legend id='JzipD'><style id='JzipD'><dir id='JzipD'><q id='JzipD'></q></dir></style></legend>

                  <i id='JzipD'><tr id='JzipD'><dt id='JzipD'><q id='JzipD'><span id='JzipD'><b id='JzipD'><form id='JzipD'><ins id='JzipD'></ins><ul id='JzipD'></ul><sub id='JzipD'></sub></form><legend id='JzipD'></legend><bdo id='JzipD'><pre id='JzipD'><center id='JzipD'></center></pre></bdo></b><th id='JzipD'></th></span></q></dt></tr></i><div id='JzipD'><tfoot id='JzipD'></tfoot><dl id='JzipD'><fieldset id='JzipD'></fieldset></dl></div>
                  本文介绍了为什么 bootstrap 在 .span 上使用浮点数而不是 display: inline-block?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在修改自定义网格,并想看看其他人是如何创建他们的网格系统的.由于 twitter 的 bootstrap 似乎很受欢迎,所以我查看了它的代码.现在我想知道 他们为什么要使用浮点数? 我会使用 display: inline-block; html 元素有 display: inline;>display: block; 我会尽量避免浮动.但出于某种原因,引导程序创建者决定使用浮点数.首先我认为他们使用它们具有向后兼容性,因为 ie6 不支持 display: inline-block; 而 ie7 仅在默认情况下支持具有 display: inline; 的元素.但是 ie6 或多或少退出了游戏,因为他们使用 micro clearfix hack 使用 *zoom: 1;以 ie6+ IMO 为目标,他们可以使用 *display: inline; 复制相同的 display: inline-block;*zoom: 1; 所以最后一个问题为什么会在显示内联块上浮动?他们有没有试图解决我上面没有提到的问题?

                  I was tinkering with custom grid and wanted to see how other people have created their grid-systems. Since twitter's bootstrap seemed to be so popular i've looked at its code. Now i wonder why are they using floats? I would use display: inline-block; html elements have either display: inline; or display: block; i would try to avoid floats. But for some reason bootstrap creators decided to use floats. first i was thinking they used them to have backward compatibility since ie6 does not support display: inline-block; and ie7 supports it only on elements with display: inline; by default. But ie6 more or less out of the game and since they use micro clearfix hack which uses *zoom: 1; to target ie6+ IMO they could replicate the same display: inline-block; with *display: inline; *zoom: 1; So the final Question Why Floats Over Display Inline Block? Are there any issues they tried to solve i didn't mentioned above?

                  推荐答案

                  在语义网的术语中,display:inline-block 应该用于放置块级元素,例如<img> 在文本行内.我们不应该使用内联布局来制作页面的主要布局.display: inline-block 的元素也对父元素的 font-sizeline-height 等属性生效.这会降低页面布局的准确性.在制作页面主布局时,您最好养成使用 float 而不是 inline-block 的习惯.

                  In the term of semantic web, the display: inline-block should be used when we want to place a block level element like <img> within line(s) of text. We shouldn't use inline placement for making the pages main layout. The element with display: inline-block also takes effect from properties like font-size and line-height of parent element. This will decrease the accuracy of page layout. You would better get in the habit of using float instead of inline-block when making the page main layout.

                  这篇关于为什么 bootstrap 在 .span 上使用浮点数而不是 display: inline-block?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Implementing Delete and Edit operations in jqgrid(在 jqgrid 中实现删除和编辑操作)
                  Bootstrap grid won#39;t work using xs columns(引导网格无法使用 xs 列)
                  Override standard method called by double click event in CRM grid.(覆盖 CRM 网格中双击事件调用的标准方法.)
                  CSS 80#39;s TRON Grid(CSS 80 的 TRON 网格)
                  Best dynamic JavaScript/JQuery Grid(最佳动态 JavaScript/JQuery 网格)
                  How to obtain a grid of equal height list items?(如何获得等高列表项的网格?)
                • <legend id='OjKWC'><style id='OjKWC'><dir id='OjKWC'><q id='OjKWC'></q></dir></style></legend>

                  1. <i id='OjKWC'><tr id='OjKWC'><dt id='OjKWC'><q id='OjKWC'><span id='OjKWC'><b id='OjKWC'><form id='OjKWC'><ins id='OjKWC'></ins><ul id='OjKWC'></ul><sub id='OjKWC'></sub></form><legend id='OjKWC'></legend><bdo id='OjKWC'><pre id='OjKWC'><center id='OjKWC'></center></pre></bdo></b><th id='OjKWC'></th></span></q></dt></tr></i><div id='OjKWC'><tfoot id='OjKWC'></tfoot><dl id='OjKWC'><fieldset id='OjKWC'></fieldset></dl></div>

                    <small id='OjKWC'></small><noframes id='OjKWC'>

                      <tbody id='OjKWC'></tbody>

                    1. <tfoot id='OjKWC'></tfoot>

                            <bdo id='OjKWC'></bdo><ul id='OjKWC'></ul>