jQuery   发布时间:2022-04-19  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了jQuery fadeIn fadeOut – IE8不淡化大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
任何人都可以告诉我为什么.jpg不会在IE8中淡入淡出或淡出。现在它只是消除和重新出现,没有不透明度的变化。我在本地设置了一个出版服务器,奇怪的是,图像淡入淡出本地,只有当我去出版服务器,他们不再褪色。

只是想知道如果我错过了一些人可以迅速帮助我脱离头顶。

这是发布服务器上的gcRotateContent,如果我只是抛出一个图像并执行淡入淡出,因为某些原因,它不能与此标记一起使用。

<div class="gcRotateContent">
   <div id="USCFRR2EN" class="gcemployeeProfile">
      <div class="gcemployeeProfileheading">
         Meet John</div>
      <div class="gcemployeeProfileContent">
         <div class="gcemployeeProfileHRPad">
         </div>
         <div class="gcemployeeProfileHR">
         </div>
         <div class="gcemployeeProfileHRPad">
         </div>
         <div class="gcemployeeProfileSLVideo">
            <img src="/PublishingImages/Profile_JOHN-190x96.jpg" alt="PorTrait of employee John."
               height="96" width="190"></div>
         <div class="gcemployeeProfilename">
         </div>
         <div class="gcemployeeProfiletitle">
            Software Development Lead,Server PerfoRMANce</div>
         <div class="gcemployeeProfileQuote">
            “you will find no other company with the sheer breadth of technologies. The things you get to see and learn from other
            people are amazing.”</div>
      </div>
      <div class="gcemployeeProfileFooter">
      </div>
   </div>
</div>@H_489_7@ 
 
<div class="gcRotate">
      <div class="gcRotateContent">
         <div style="border: solid 2px black; text-align: center; width: 150px;">
            This is first content
            <img src="http://pix.motivatedphotos.com/2008/6/16/633492359109161542-Skills.jpg"
               alt="First" />
         </div>
      </div>
      <div class="gcRotateContent">
         <div style="border: solid 2px black; text-align: center; width: 150px">
            This is second content
            <img src="http://www.funnycorner.net/funny-pictures/5010/cheezburger-locats.jpg"
               alt="Second" />
         </div>
      </div>
      <div class="gcRotateContent">
         <div style="border: solid 2px black; text-align: center; width: 150px">
            This is third content
            <img src="http://icanhascheezburger.files.wordpress.com/2007/06/business.jpg" alt="Third" />
         </div>
      </div>
   </div>



   <div>
      This shouldn't move.
   </div>

   <script type="text/javascript">
      function fadeContent() {

         $(".gcRotateContent").first().customFadeOut(500,function() {
            $(".gcRotateContent:hidden:first").customFadeIn(500)
         });
         $(".gcRotateContent").first().appendTo($(".gcRotateContent").parent());
      }

      $(".gcRotate").height(0);

      $(".gcRotateContent").each(
         function() {
            if ($(".gcRotate").height() < $(this).height()) {
               $(".gcRotate").height($(this).height());
            }
         }
         );

      $(".gcRotateContent").each(function() {
         $(this).css("display","none")
      });

      $(".gcRotate").hover(function() { window.clearInterval(timer) },function() { timer = window.seTinterval("fadeContent()",2000) });

      $(".gcRotateContent").first().show(0);
      var timer = window.seTinterval("fadeContent()",2000);

      (function($) {
         $.fn.customFadeIn = function(speed,callBACk) {
            $(this).fadeIn(speed,function() {
               if (jQuery.browser.msiE)
                  $(this).get(0).style.removeAttribute('filter');
               if (callBACk != undefined)
                  callBACk();
            });
         };
         $.fn.customFadeOut = function(speed,callBACk) {
            $(this).fadeOut(speed,function() {
               if (jQuery.browser.msiE)
                  $(this).get(0).style.removeAttribute('filter');
               if (callBACk != undefined)
                  callBACk();
            });
         };
      })(jQuery);
   </script>@H_489_7@

解决方法

显然有一个解决方法

简单地将绝对/相对定位的元素设置为以下css属性

opacity:inherit;
filter:inherit;@H_489_7@ 
 

例如:

<div>
<img id='myImg' src='http://mydomain.com' style='position:absolute;top:10px;left:5px;filter:inherit;opacity:inherit' />
</div>@H_489_7@ 
 

玩的开心,

奥马尔

大佬总结

以上是大佬教程为你收集整理的jQuery fadeIn fadeOut – IE8不淡化全部内容,希望文章能够帮你解决jQuery fadeIn fadeOut – IE8不淡化所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。