左边是 chrome,右边是 IE9,同样的图像,同样的 html,但其中一个看起来完全是垃圾。如何让 IE 不搞砸我的图像?
这是页面中显示的实际图像,以防万一
这是html:
<div id="logo-body" class="x-panel-body x-panel-body-default x-panel-body-default" style="height: 80px; width: 950px; left: 0px; top: 0px;">
<img src="/static/img/logo.gif" height="40"><a id="logout" href="/viewer/logout">Logout</a>
<div id="logo-clearEl" class="x-clear" role="presentation">
</div>
</div>
这是img标签的css
#logo-body img {
margin-top: 20px;
margin-left: 10px;
}
.x-border-box, .x-border-box * {
box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
fieldset, img {
border: 0;
}
和父 div 的 css
#logo-body {
border: none;
}
#logo, #logo-body {
background-color: #002d56;
background-image: -moz-radial-gradient(50% 50%, cover, #008dc6, #002d56 68%);
background-image: -webkit-radial-gradient(50% 50%, cover, #008dc6, #002d56 68%);
background-image: -o-radial-gradient(50% 50%, cover, #008dc6, #002d56 68%);
background-image: -ms-radial-gradient(50% 50%, cover, #008dc6, #002d56 68%);
background-image: radial-gradient(50% 50%, cover, #008dc6, #002d56 68%);
}
.x-panel-body-default {
background: white;
border-color: #99bce8;
color: black;
border-width: 1px;
border-style: solid;
}
.x-panel-body-default {
background: white;
border-color: #99bce8;
color: black;
border-width: 1px;
border-style: solid;
}
.x-panel-body {
overflow: hidden;
position: relative;
font-size: 12px;
}
.x-border-box, .x-border-box * {
box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
html, body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td {
margin: 0;
padding: 0;
}