CSS Transitions和IE10

时间:2014-01-26 21:38:00

标签: html css css3 css-transitions

我知道IE10应该支持所有CSS3转换而不需要任何类型的供应商前缀。我无法让我的特定风格在IE10中正确显示。

以下是我的问题示例:http://jsfiddle.net/ntwiles/8xw5N/1/

.photo_bar_image {
    background-image:url("http://i.imgur.com/eODa6AC.jpg");
    border-radius:9px;
    background-size: 125px;
    display: inline-block;
    width: 125px;
    height: 125px;
    text-decoration:none;
    transition-property: background-size, background-position;
    transition-duration:0.2s;
}
.photo_bar_image:hover {
    background-size:140px;
    background-position: -5px -5px;
}

它在我测试过的浏览器中运行良好,但在IE10中,过渡很快。 (具体来说,它似乎正确地转换了background-position属性,但跳过了background-size属性的过渡帧。

我有什么样的选择来处理这类问题?

1 个答案:

答案 0 :(得分:0)

尝试这样做:

.photo_bar_image {
    background-image:url("http://i.imgur.com/eODa6AC.jpg");
    border-radius:9px;
    background-size: 125px;
    display: inline-block;
    width: 125px;
    height: 125px;
    text-decoration:none;
    -webkit-transition-property: background-size, background-position;
    -moz-transition-property: background-size, background-position;
     -ms-transition-property: background-size, background-position;
      -o-transition-property: background-size, background-position;
         transition-property: background-size, background-position;
    -webkit-transition-duration:0.2s;
       -moz-transition-duration:0.2s;
        -ms-transition-duration:0.2s;
         -o-transition-duration:0.2s;
            transition-duration:0.2s;
}
.photo_bar_image:hover {
    background-size:140px;
    background-position: -5px -5px;
}