使用velocity.js和svg进行动画时,IE 11神奇地崩溃了
当运行velocity.js做一个svg动画时,js小提示显示ie 11的崩溃
只需左键单击箭头旁边的f
这只发生在IE 11中, 也许在其他版本的IE上也是如此。
Chrome似乎很好用。
HTML
body { background-color:#000000 } #box1 { position: absolute; left: 250px; top: 330px; width: 257px; height: 62px; opacity: 0; z-index: 1; } #box2 { position: absolute; right: 250px; top: 330px; width: 315px; height: 62px; opacity: 0; z-index: 1; } #positionP { position: absolute; left: 250px; top: 330px; } #positionG { position: absolute; right: 250px; top: 330px; } $(function(){ var lux = {}; lux.isPopen = false; lux.isGopen = false; $(".doanimateP").on("click", function(){ $(".animated").velocity("stop", true); if(lux.isPopen){ $(".animated").velocity("reverse"); lux.isPopen = false; return; } lux.isPopen = true; if(lux.isGopen){ $(".animated2") .velocity("stop", true) .velocity("reverse", { duration: "50" }); lux.isGopen = false; } $(".toBeAnimatedLine1") .velocity({ y2: "469"},{ duration: "2000"}); $(".toBeAnimatedLine2") .velocity({ x2: "50" },{ duration: "350", delay: "800"}); $(".toBeAnimatedLine3") .velocity({ x2: "50" },{ duration: "350", delay: "1000"}); $(".toBeAnimatedLine4") .velocity({ x2: "50" },{ duration: "350", delay: "1400"}); $(".toBeAnimatedLine5") .velocity({ x2: "50" },{ duration: "350", delay: "1900"}); $(".tanim1") .velocity({opacity: 1},{ duration: "700", delay: "800"}); $(".tanim2") .velocity({opacity: 1},{ duration: "700", delay: "1000"}); $(".tanim3") .velocity({opacity: 1},{ duration: "700", delay: "1400"}); $(".tanim4") .velocity({opacity: 1},{ duration: "700", delay: "1900"}); $(".tanim5") .velocity({opacity: 1},{ duration: "700", delay: "2100"}); $(".tanim6") .velocity({opacity: 1},{ duration: "700", delay: "2300"}); $(".tanim7") .velocity({opacity: 1},{ duration: "700", delay: "2500"}); $(".tanim8") .velocity({opacity: 1},{ duration: "700", delay: "2700"}); }); }); f e d c b a z y x