简体   繁体   English

图像和进度栏未在Internet Explorer中加载,但在Firefox,Chrome等中加载

[英]Image & progress bar not loading in internet explorer, but loads in firefox, chrome etc

I am using the latest IE, Firefox and chrome. 我正在使用最新的IE,Firefox和chrome。 When I am running my php code on my local server or even my main server. 当我在本地服务器甚至主服务器上运行php代码时。 The images in the content slider & the progress bar doesn't load in Internet explorer alone. 内容滑块和进度栏中的图像不会单独在Internet Explorer中加载。 It shows up as a black image. 它显示为黑色图像。 Below is the code for my content slider and its css. 以下是我的内容滑块及其CSS的代码。

I have looked for solutions everywhere and don't seem to find the problem in my code. 我到处都在寻找解决方案,但似乎在我的代码中找不到问题。 I have even checked that my images which are jpg are in the RGB format, which some people have faced before. 我什至检查过我的jpg图像是否为RGB格式,这是某些人以前遇到的。

</div>
<!--slider for news-->
<div class="container">
<div id="content-slider">
<div id="slider">
    <div id="mask">
    <ul>
    <li id="first" class="firstanimation">
    <a href="#">
    <img src="login/images/images1.jpg" alt="news1"/>
    </a>
    </li>

    <li id="second" class="secondanimation">
    <a href="#">
    <img src="login/images/images2.jpg" alt="news2"/>
    </a>
    </li>

    <li id="third" class="thirdanimation">
    <a href="#">
    <img src="login/images/images3.jpg" alt="news3"/>
    </a>
    </li>

    <li id="fourth" class="fourthanimation">
    <a href="#">
    <img src="login/images/images4.jpg" alt="news4"/>
    </a>
    </li>

    <li id="fifth" class="fifthanimation">
    <a href="#">
    <img src="login/images/images5.jpg" alt="news5"/>
    </a>
    </li>
    </ul>
    </div>
    <div class="progress-bar"></div>
    </div>
</div>

The css for the above is as given below. 上面的css如下所示。

/* LAYOUT */
.container {
margin:0 auto;
overflow:hidden;
width:960px;
}

/* CONTENT SLIDER */
#content-slider {
width:auto;
height:220px; /* 360px*/
margin:10px auto 0;
}
/* SLIDER */
#slider {
background:#000;
border:5px solid #eaeaea;
box-shadow:1px 1px 5px rgba(0,0,0,0.7);
height:193px;
width:155px;
margin:40px auto 0;
overflow:visible;
position:absolute;
top:150px;
left:800px;
float:right;
}
#mask {
overflow:hidden;
height:320px;
}
#slider ul {
margin:0;
padding:0;
position:relative;
}
#slider li {
width:680px;
height:320px;
position:absolute;
top:-325px;
list-style:none;
} 

#slider li.firstanimation {
-moz-animation:cycle 25s linear infinite;   
-webkit-animation:cycle 25s linear infinite;        
}
#slider li.secondanimation {
-moz-animation:cycletwo 25s linear infinite;
-webkit-animation:cycletwo 25s linear infinite;     
}
#slider li.thirdanimation {
-moz-animation:cyclethree 25s linear infinite;
-webkit-animation:cyclethree 25s linear infinite;       
}
#slider li.fourthanimation {
-moz-animation:cyclefour 25s linear infinite;
-webkit-animation:cyclefour 25s linear infinite;        
}
#slider li.fifthanimation {
-moz-animation:cyclefive 25s linear infinite;
-webkit-animation:cyclefive 25s linear infinite;        
}
#slider:hover li, 
#slider:hover .progress-bar {
-moz-animation-play-state:paused;
-webkit-animation-play-state:paused;
}

/* PROGRESS BAR */
.progress-bar { 
position:relative;
top:-5px;
width:680px; 
height:5px;
background:#000;
-moz-animation:fullexpand 25s ease-out infinite;
-webkit-animation:fullexpand 25s ease-out infinite;
}

You've not mentioned Keyframes you're using for animation. 您尚未提及用于动画的关键帧。 And also you've written animation property for two browsers only. 而且,您只为两个浏览器编写了动画属性。

#slider li.firstanimation {
   -moz-animation:cycle 25s linear infinite;   /* This is Firefox prefix*/
   -webkit-animation:cycle 25s linear infinite;  /* This is Chrome/Opera prefix*/
}

IE don't understand above prefixes so add IE无法理解以上前缀,因此添加

#slider li.firstanimation {
   -moz-animation:cycle 25s linear infinite;   /* This is Firefox prefix*/
   -webkit-animation:cycle 25s linear infinite;  /* This is Chrome/Opera prefix*/
   animation:cycle 25s linear infinite; /* for IE */
}

Now what I can assume here is that animation is not happening due to prefix problem and your images are not being displayed. 现在,我可以假设的是,由于前缀问题而没有发生动画,并且没有显示图像。 Please update you question with more details and add fiddle. 请使用更多详细信息更新您的问题,并添加小提琴。

Additionally added the following then only it works 另外添加了以下内容,然后它才有效

animation: fullexpand 10s ease-out infinite;  
@keyframes fullexpand {
    0% {
        width: 0px;}
    100% {
        width: 100%;};
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 有没有办法在新浏览器(Chrome / FireFox等)中打开Internet Explorer中的链接? - Is there a way to have a link in Internet Explorer that opens in a new browser (Chrome / FireFox / etc.)? chrome,firefox和Internet Explorer中的Ajax和html事件 - Ajax and html events in chrome, firefox and Internet Explorer jQuery可在Internet Explorer中使用,但不能在Chrome和Firefox中使用 - jQuery works in Internet Explorer but not in Chrome and Firefox 当Curl在PHP中加载json时加载图标或进度栏 - Loading icon or progress bar while Curl loads json in PHP 提交按钮未出现在Firefox中,但出现在Chrome和Internet Explorer上 - Submit button does not appear in Firefox but on Chrome and Internet Explorer Magento Static 块在 Inte.net Explorer 上的位置与 Chrome 上的不同,Firefox - Magento Static Block is at a Different Place on Internet Explorer than on Chrome, Firefox 登录代码无法在Internet Explorer中使用,但可以在Chrome和Firefox中使用 - Sign-in code not working in Internet Explorer but yes in Chrome and Firefox 提交按钮不适用于Chrome或Firefox,但适用于Internet Explorer - The Submit Button doesn't work in Chrome or Firefox, but Works in Internet Explorer Internet Explorer 和图像提交 - Internet explorer and image submit PHP表单发布使Internet Explorer中出现Page Not Found 404错误,而Firefox和Chrome获得了预期的结果 - PHP form post gives Page Not Found 404 error in Internet Explorer while Firefox and Chrome give expected results
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM