css浮動(dòng)邊距加倍錯(cuò)誤(雙倍邊距BUG)的解決辦法_Div+CSS教程
如果某條邊與浮動(dòng)方向同向,則向該邊上的浮動(dòng)框應(yīng)用邊距時(shí),邊距會(huì)增加一倍。此錯(cuò)誤只影響一次或多次浮動(dòng)的某行中的第一次浮動(dòng)。
影響: Internet Explorer 6.0
該錯(cuò)誤只影響ie而不影響其他瀏覽器,我們可以考慮用hack來(lái)解決!!!
_display:inline;
加入上面這句問(wèn)題解決
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è)計(jì)的誤區(qū)
- CSS基礎(chǔ):常用CSS英文字體介紹
- IE6和IE7中border邊框斷線現(xiàn)象
- border:none;與border:0;的有什么不同?
- div+css下js對(duì)聯(lián)廣告不隨屏幕滾動(dòng)的解決方法
- HTML元素的ID和Name屬性的區(qū)別
- divcss教程:深入了解css的行高Line Height屬性
- CSS文檔流,塊級(jí)元素和內(nèi)聯(lián)元素
- 5個(gè)你該知道的CSS3新技術(shù)
- 用正則表達(dá)式替換a標(biāo)記href值
- 30個(gè)優(yōu)秀的CSS導(dǎo)航和按鈕設(shè)計(jì)教程
- css中px和em有什么區(qū)別
Div+CSS教程Rss訂閱Div+Css教程搜索
Div+CSS教程推薦
- 應(yīng)用DIV CSS布局以后該在什么時(shí)候使用TABLE?
- css中px和em有什么區(qū)別
- CSS小結(jié):一行內(nèi)文本超出指定寬度溢出的處理
- CSS中expression怎么用?CSSexpression詳解
- DIVCSS網(wǎng)頁(yè)布局:HTML結(jié)構(gòu)化DIVCSS網(wǎng)頁(yè)布局入門(mén)指南
- Div css菜單:一張圖片實(shí)現(xiàn)翻轉(zhuǎn)效果!
- 定義的css樣式?jīng)]有作用呢
- CSS下拉及多級(jí)彈出式菜單
- CSS帶當(dāng)前標(biāo)識(shí)的標(biāo)簽式橫向?qū)Ш?/a>
- 徹底弄懂CSS盒模型BoxModel
- 相關(guān)鏈接:
- 教程說(shuō)明:
Div+CSS教程-css浮動(dòng)邊距加倍錯(cuò)誤(雙倍邊距BUG)的解決辦法。