【发布时间】:2015-03-15 02:36:30
【问题描述】:
我正在尝试制作一个小脚本来在我的 html 测试中设置“选择”标签的样式,以支持“外观”样式属性:
if ("webkitAppearance" in select.style ||
"MozAppearance" in select.style ||
"oAppearance" in select.style ||
"appearance" in select.style ||
"-ms-expand" in select.style) {
return;
}
// else apply wrapper and style it.
问题是我不知道如何检查 -ms-expand 属性,因为它不起作用,在这种情况下我不想用户浏览器版本嗅探。
【问题讨论】:
-
好吧,看看所有其他的是如何构建的。
-moz-appearance变为MozAppearance。你认为-ms-expand可能会变成MsExpand?也就是说,它可能会遵循 Chrome 的模式并成为msExpand,但无论哪种方式,只是逻辑...... -
已经尝试了所有的msExpand、MsExpand、MSExpand...
标签: javascript css internet-explorer internet-explorer-10 internet-explorer-11