我需要插入黑客到網頁,所以它在IE7.0上運行良好 但我在處理問題的方式。它應該很簡單。Internet Explorer 7.0 CSS黑客
實際的CSS代碼如下:
<style type="text/css">
body { margin:0;}
#home_splash { background-image:url(homeimages/image-background.jpg);background-repeat:repeat-x; background-position:left top;}
#home_splash #home_text { height:470px; padding-top:25px;padding-left:38px; }
#home_splash #home_text_1,
#home_splash #home_text_2 { display:none; }
#home_splash #home_text_1 { width:172px; height:58px; top:0px; left:70px; position:relative; background:inherit; background-position: -70px 0px; }
#home_splash #home_text_2 { width:212px; height:27px; top:460px; left:868px; position:relative; background:inherit; background-position: -868px -460px; }
#home_splash {background-color:#d1d1d9;margin-top:-15px; background-repeat:repeat;width:100%; }
#home_splash .picture { background-image: url(homeimage/image.jpg); width:960px; height:520px; display:block; margin-top:20px; margin-left :auto; margin-right:auto; }
#home_splash #boxes { margin-left:auto; margin-right:auto;padding-top:0px; font-family:"Trebuchet MS", Arial, Helvetica, sans-serif; color:#666; font-size:12px; font-weight:bold; height:190px; width:930px;}
#home_splash #boxes .box { width:33%; float:left; display:block;background-repeat:repeat-x;}
#home_splash #boxes h3 { font-size:23px; border-bottom: 1px solid #bcbcc4; color:#000033; margin:0; }
#home_splash #boxes h3,
#home_splash #boxes p {margin: 4px 25px; }
#home_splash #boxes p { line-height:160%; }
#home_splash #boxes .box_separator { border-right:1px solid #eee;}
ul#nav { width:100%; height:37px; margin:0px;display:block; background-color:#000; background-repeat:repeat-x; }
#container {background-color:#d1d1d9; zoom:1; }
#content { margin:0; }
.splash_text {width:885px; height:463px;}
</style>
我想在這CSS一個變化。
我想更改以下行:
#home_splash .picture { background-image: url(homeimage/image.jpg); width:960px; height:520px; display:block; margin-top:20px; margin-left :auto; margin-right:auto; }
我想IE7.0刪除 '的margin-top:20px的;'財產 - 但INLINE在此HTML文件只
如果有一個CSS不一致,可以重新創建它的jsfiddle?有時候,如果不配合瀏覽器特定的樣式,就有可能繞過這種方式 – 2010-10-20 15:32:18
s /有時/通常/。不幸的是,jsFiddle不支持IE <9 IIRC。 – cHao 2014-01-14 07:31:16