简体   繁体   中英

image in IE doesn't display

Could you please help me that this code doesn't work in IE? But this one works with firefox I think I'm missing something

Thanks

<html>
<head>
<title>tintin</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css"> 
#tintin{
position: relative;
top: 100px;
left: 100px;
font-size:18pt;
color:white;
font-style:bold;
font:Calibri;
filter:alpha(opacity=0);
opacity:0;}
</style>
<script type="text/javascript"> 

var txt=['text 1','text 2', 'text 3', 'text 4', 'text 5', 'text 6', 'text 7', 'text 8', 'text 9', 'text 10'], init=0,i=0,k=0,speed=50,el;
var loopCount=6;
var j=0;
function fade(){
init==0?i++:i--;
el.filters?el.style.filter='alpha(opacity='+i+')':el.style.opacity=i/100;
el.firstChild.nodeValue=txt[k];
if(i==100)init=1;
if(i==0) {init=0;k++;j++;} 
if(k==txt.length)k=0;
if (j<loopCount) setTimeout('fade()',speed);
}
window.onload=function(){
el=document.getElementById('tintin');
fade();
}
</script>
</head>
<body>
<div id="tintin">&nbsp;</div>
</div>
<div class="image">
  <img alt="" src="test.jpg" />
</div>

</body>
</html>

Maybe it's not the size of image. I had a similar issue. In my case was the extension of the image that was different from the real encoding. I had saved a jpg/png image with gif extension. All browser recognized the image in the real format (not the in the extension), but IE not.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM