css浮動邊距加倍錯誤(雙倍邊距BUG)的解決辦法_Div+CSS教程
如果某條邊與浮動方向同向,則向該邊上的浮動框應用邊距時,邊距會增加一倍。此錯誤只影響一次或多次浮動的某行中的第一次浮動。
影響: Internet Explorer 6.0
該錯誤只影響ie而不影響其他瀏覽器,我們可以考慮用hack來解決�。�!
_display:inline;
加入上面這句問題解決
adobe官方解決方法:
Problem
When a margin is applied to a floated box on the same side as the direction the box is floated AND the floated box is the first one inside its containing box, the margin is doubled. (In other words, a left-floated box with margin-left set to move it away from its containing box will be twice as far away from the left edge of the containing box as intended.)
Solution
Specify display: inline; for the affected float.
Detailed description
This bug only reproduces when the floated element''s margin extends in the same direction as the float itself, and is between the float and the container box''s inside edge. Subsequent floats with similar margins won''t reproduce this bug- just the first float in any row of floated elements.
原文地址:http://www.adobe.com/cfusion/communityengine/index.cfm?event=findByTextId&productid=1&textid=DOUBLED_FLOAT_MARGIN
- DIV+CSS設(shè)計的誤區(qū)
- CSS基礎(chǔ):常用CSS英文字體介紹
- IE6和IE7中border邊框斷線現(xiàn)象
- border:none;與border:0;的有什么不同?
- div+css下js對聯(lián)廣告不隨屏幕滾動的解決方法
- HTML元素的ID和Name屬性的區(qū)別
- divcss教程:深入了解css的行高Line Height屬性
- CSS文檔流,塊級元素和內(nèi)聯(lián)元素
- 5個你該知道的CSS3新技術(shù)
- 用正則表達式替換a標記href值
- 30個優(yōu)秀的CSS導航和按鈕設(shè)計教程
- css中px和em有什么區(qū)別
- 相關(guān)鏈接:
- 教程說明:
Div+CSS教程-css浮動邊距加倍錯誤(雙倍邊距BUG)的解決辦法
。