CSS转换和动画无法在IE中运行(适用于Firefox/Chrome)

mat*_*ure 3 html css internet-explorer css3

如何编辑我的代码以使其在IE中工作.它在Firefox和Chrome中运行良好.我无法弄清楚在Internet Explorer中调用transition和的正确属性animation.

<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>
Run Code Online (Sandbox Code Playgroud)

编辑:无论如何使用像div块或任何东西在ie中产生类似的效果?

Ric*_*haw 7

IE10是第一个支持转换的IE.我通常要么忽略旧浏览器中的动画(旧IE经常 - >旧计算机,因此动画通常不稳定).

如果它真的需要,那么使用jQuery来修补它.缺点是动画颜色没有内置到jQuery中,所以你需要一个插件.