删除 -khtml- 供应商前缀时会失去哪些兼容性?
我有一些使用 -webkit-
供应商前缀的 CSS 片段。为了与 Safari 的“旧”版本兼容,我对 -khtml-
供应商前缀有相同的规则。我对与 Konqueror 和其他真正的 KHTML 浏览器的兼容性不感兴趣。
例如,我可能有以下规则:
.menuItem {
-khtml-user-select: none;
-webkit-user-select: none;
}
我知道现代 WebKit 浏览器在内部将所有 -khtml-
和 -apple-
规则重写为 -webkit-< /code> 规则代替。然而,这给我留下了以下问题:
在哪个版本的 Safari 中,-webkit-
可用?也就是说,在哪个版本之前 Safari 会完全忽略我的规则?
我打算使用此信息来查明我的个人规则(例如 -khtml-user-select
)是否有效实际上这个早期版本的 Safari 支持。
I have bits and pieces of CSS that use the -webkit-
vendor prefix. For compatibility with "older" versions of Safari, I have the same rule with the -khtml-
vendor prefix. I am actively uninterested in compatibility with Konqueror and other true KHTML browsers.
For example, I may have the following rules:
.menuItem {
-khtml-user-select: none;
-webkit-user-select: none;
}
I understand that modern WebKit browsers internally rewrite all -khtml-
and -apple-
rules to be -webkit-
rules instead. However, that leaves me with the following question:
In what version of Safari did -webkit-
become available? That is, what is the version before which Safari would completely ignore my rules?
I plan to use this information to find out whether my individual rules (such as -khtml-user-select
) are actually supported by this early version of Safari.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
-webkit-
前缀自 Safari 3。 Safari 2 从那时起被替换。参考
Webkit 63854 变更日志
Chromium 变更日志< /a>
Webkit 错误 42990< /a>
KHTML 和 WebKit 的分叉
<一href="http://arstechnica.com/apple/2007/06/ars-at-wwdc-interview-with-lars-knoll-creator-of-khtml/" rel="nofollow noreferrer">拉斯·诺尔访谈, KHTML 的创建者
为 WebKit 做出贡献的公司和组织
<一href="https://github.com/KDE/konqueror/blob/master/settings/konqhtml/css/kcmcss.cpp" rel="nofollow noreferrer">konqueror/kcmcss.cpp at master·KDE/konqueror
The
-webkit-
prefix has been around since Safari 3. The-khtml-
references in Safari 2 were replaced from that point on.References
Webkit 63854 Changelog
Chromium Changelog
Webkit Bug 42990
Unforking of KHTML and WebKit
Interview with Lars Knoll, creator of KHTML
Companies and Organizations that have contributed to WebKit
konqueror/kcmcss.cpp at master · KDE/konqueror
现在唯一使用
-khtml-
前缀的浏览器是 Konqueror ,由于它的市场份额很小(不到1%),你可以放心地放弃它。The only browser that uses the
-khtml-
prefix now is a Konqueror, since it have a very little market share (less than 1%), you can drop it safely.基本上很少有人使用 Konqueror,所以没有必要使用 -khtml- 前缀
Basically very less people uses Konqueror, So it is not necessary to use -khtml- prefix