【问题标题】:how usefull using browser specific css like -webkit- -moz- [duplicate]使用浏览器特定的css(如-webkit--moz-)有多有用[重复]
【发布时间】:2015-11-08 14:51:50
【问题描述】:

这个浏览器特定的 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,或者即使值相同也必须使用它?

【问题讨论】:

标签: html css


【解决方案1】:
.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/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-09-21
    • 1970-01-01
    • 2016-10-16
    • 2012-06-13
    • 1970-01-01
    • 2014-07-16
    • 2011-12-11
    相关资源
    最近更新 更多