CSS转换和动画不工作在IE(在Firefox / Chrome中工作) [英] CSS transition and animation not working in IE (works in Firefox/Chrome)

查看:114
本文介绍了CSS转换和动画不工作在IE(在Firefox / Chrome中工作)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何编辑我的代码,使其工作在IE。它的工作伟大的Firefox和Chrome。
我无法找出在Internet Explorer中调用转换动画的正确属性。 / p>

How can I edit my code to make it work in IE. It works great in Firefox and Chrome. I can't figure out the correct attributes for calling the transition and animation in Internet Explorer.

<html>
<head>
<title> Sample for Konstantin</title>
<style type="text/css">

.text p
{text-align:center;
margin-left:auto;
margin-right:auto;
left:50%;

}
.text {

    overflow: hidden;
    margin-bottom: 110px;
    }

.text h1 {
    color: black;
    font-family: 'footlight mt light';
    font-size: 50px;
    -webkit-animation-name: fade-in;
    -webkit-animation-duration: .9s;
    letter-spacing: -10px;

    }
    a { text-decoration:none }

    .text h1 span a {
        -webkit-transition: 0.9s ;
                color: #9C948D;
        }

        .text h1:hover span a {
            color: blue;
            }


</style>
</head>
<body>
    <center>

    <div class="text"><p><h1>This is a sample, <br />
   My Name is Matthew<br />Here is <span><a href="http://www.nba.com" >NBA Website</a>.</span><br />This is very simple<br />Here is  <span><a href="http://www.facebook.com" > Facebook!</a>.</span></h1>
</p></div>
</body></html>

编辑:有没有反正使用像div块或任何东西,

is there anyway to use like a div block or anything to make a similar effect in ie?

推荐答案

IE10是第一个支持转换的IE。我通常要么忽略旧的浏览器中的动画(旧的IE经常 - >旧的计算机,所以动画通常是破烂的)。

IE10 is the first IE to support transitions. I usually either ignore the animation in old browsers (old IE often -> old computer, so animations are often choppy).

如果它真的需要,然后使用jQuery来补丁向上。缺点是动画颜色不是内置的jQuery,所以你需要一个插件。

If it's really required then use jQuery to patch it up. Downside is that animating color isn't built into jQuery so you'll need a plugin.

这篇关于CSS转换和动画不工作在IE(在Firefox / Chrome中工作)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆