使用浏览器特定的CSS如-webkit- -moz-有多么有用

时间:2015-08-15 14:01:11

标签: html css

这个浏览器特定的css是如何使用的?

我有这个:

.example {
    transition: all 0.2s ease-in-out 0s ;
    -moz-transition: all 0.2s ease-in-out 0s ;
    -webkit-transition: all 0.2s ease-in-out 0s
}

所有具有相同的值all 0.2s ease-in-out 0s

我应该使用它们中的全部三种,还是只使用这样的一种?

.example {
    transition: all 0.2s ease-in-out 0s ;
}

默认情况下,此转换css的上一个值。

如果我只想要特定浏览器的特定样式,或者即使值相同也必须使用它是否需要使用这个浏览器特定的CSS?

1 个答案:

答案 0 :(得分:0)

.example {
    transition: all 0.2s ease-in-out 0s ;
    -moz-transition: all 0.2s ease-in-out 0s ;
    -webkit-transition: all 0.2s ease-in-out 0s
}

这适用于大多数浏览器。

.example {
    transition: all 0.2s ease-in-out 0s ;
}

这适用于不超过2个浏览器

请参阅此指南http://caniuse.com/