我正在尝试使粘性页脚从顶部淡入并从底部淡出。我的代码似乎对Google Chrome,Firefox等完全正常。但是对于IE11则根本不起作用。
以下是我的CSS代码。
有谁知道如何解决这个问题?



.sticky-footer-show {
  overflow-y: hidden;
  -webkit-transition-timing-function: cubic-bezier(0, 1, 0.5, 1);
       -o-transition-timing-function: cubic-bezier(0, 1, 0.5, 1);
          transition-timing-function: cubic-bezier(0, 1, 0.5, 1);

  -webkit-transition: all 1s;
  -o-transition: all 1s;
  transition: all 1s;
} //.sticky-footer-show

.sticky-footer-remove {
  -webkit-transition-timing-function: cubic-bezier(0, 1, 0.5, 1);
       -o-transition-timing-function: cubic-bezier(0, 1, 0.5, 1);
          transition-timing-function: cubic-bezier(0, 1, 0.5, 1);

  -webkit-transition: all 1s;
  -o-transition: all 1s;
  transition: all 1s;
  height: 0;
} //.sticky-footer-remove

最佳答案

您可能正在寻找-ms-前缀

但是,根据此答案CSS3 + Javascript - Will -ms-transition:opacity 1s ease-in-out; work in IE 10 alone?,它也应该仅适用于过渡

但是作为Internet Explorer的Internet Explorer可能会阻止它。



.sticky-footer-show {
  overflow-y: hidden;
  -webkit-transition-timing-function: cubic-bezier(0, 1, 0.5, 1);
       -o-transition-timing-function: cubic-bezier(0, 1, 0.5, 1);
      -ms-transition-timing-function: cubic-bezier(0, 1, 0.5, 1);
          transition-timing-function: cubic-bezier(0, 1, 0.5, 1);

  -webkit-transition: all 1s;
  -ms-transition: all 1s;
  -o-transition: all 1s;
  transition: all 1s;
} //.sticky-footer-show

.sticky-footer-remove {
  -webkit-transition-timing-function: cubic-bezier(0, 1, 0.5, 1);
       -o-transition-timing-function: cubic-bezier(0, 1, 0.5, 1);
      -ms-transition-timing-function: cubic-bezier(0, 1, 0.5, 1);
          transition-timing-function: cubic-bezier(0, 1, 0.5, 1);

  -webkit-transition: all 1s;
  -o-transition: all 1s;
  -ms-transition: all 1s;
  transition: all 1s;
  height: 0;
} //.sticky-footer-remove





您是否尝试过在transition命令中使用所有功能?

 .sticky-footer-show, .sticky-footer-remove {
    -webkit-transition: transform 1s cubic-bezier(0, 1, 0.5, 1);
         -o-transition: transform 1s cubic-bezier(0, 1, 0.5, 1);
        -ms-transition: transform 1s cubic-bezier(0, 1, 0.5, 1);
            transition: transform 1s cubic-bezier(0, 1, 0.5, 1);
 }
 .sticky-footer-remove {
       height: 0;
 }


建议:不要尝试通过精美的图形DODA支持IE11。让他们快速移至其他状态,但使您的网页正常运行。到现在,一半的Internet都已断开,IE11将被使用,并在某个时候转移到chrome / firefox / edge。

07-28 02:43
查看更多