2012-03-08 16 views
0

可能重複:
is there a program or a framework which allows to build cross browser compatible html and css codes?如何使所有的瀏覽器從相同的行爲相同的CSS渲染,並期待

我的問題是這樣的,我有不同的行爲的應用程序在IE,FF和Chrome上。例如,我有幾個按鈕在IE和FF + Chrome瀏覽器上看起來不同,因此如何才能以相同的CSS運行所有目標。在Chrome中,我對所有下拉列表和其他許多下拉列表的背景都有問題。如果有人有解決方案。 謝謝。

+3

忘了它。 – 2012-03-08 08:27:33

+0

沒有真正的「一刀切」解決方案。看看我的答案在這個問題:http://stackoverflow.com/questions/8850363/is-there-a-program-or-a-framework-which-allows-to-build-cross-browser-compatible/ 8850500#8850500 – Bazzz 2012-03-08 08:28:08

回答

0

添加到CSS文件的頂部

html 
{ 
    height: 100%; 
} 
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, textarea, p, blockquote, th, td 
{ 
    margin: 0; 
    padding: 0; 
} 
table 
{ 
    border-collapse: collapse; 
    border-spacing: 0; 

} 
fieldset, img 
{ 
    border: 0; 
} 
address, caption, cite, code, dfn, em, strong, th, var 
{ 
    font-style: normal; 
    font-weight: normal; 
} 
ol, ul 
{ 
    list-style: none; 
} 
caption, th 
{ 
    text-align: left; 
} 
h1, h2, h3, h4, h5, h6 
{ 
    font-size: 100%; 
    font-weight: normal; 
} 
q:before, q:after 
{ 
    content: ''; 
} 
abbr, acronym 
{ 
    border: 0; 
} 
+0

這是meyers css重置權嗎? – 2012-03-08 08:36:00

0

你可以嘗試(白白可能)使用條件註釋來設置樣式信息對每個瀏覽器,或者利用已知瀏覽器的怪癖,但最好和唯一途徑在所有瀏覽器中統一觀察是堅持符合W3C標準的標記。

除此之外,您可以通過使用圖像而不是標記來克服圖形問題。

相關問題