未来证明CSS黑客为LTE Opera 10 [英] Future proof CSS hack for LTE Opera 10
本文介绍了未来证明CSS黑客为LTE Opera 10的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我目前使用 @media屏幕和(-webkit-min-device-pixel-ratio:0)
来定位Webkit浏览器+ Opera 9.2。
有安全*方式指定Opera GTE 9.5或LTE 10吗?
解决方案
这很难,但在这里是。仅适用于Opera gte 9.5和lt 10.50:
@media all和(resolution = 0dpi){//排除Opera 10.50更高
:root #box {//您需要附加:root到所有选择器以排除Opera lt 9.5
background:#f00;
}
}
I am currently using @media screen and (-webkit-min-device-pixel-ratio:0)
to target Webkit browsers + Opera 9.2.
Is there a safe* way to target Opera GTE 9.5 or LTE 10?
* won't be picked up by another browser
解决方案
That was hard but here it is. Works only in Opera gte 9.5 and lt 10.50:
@media all and (resolution = 0dpi) { // exclude Opera 10.50 and higher
:root #box { // you need to append :root to all selectors to exclude Opera lt 9.5
background: #f00;
}
}
这篇关于未来证明CSS黑客为LTE Opera 10的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文