IE3忽略了CSS3:not()选择器

ggz*_*one 0 css css-selectors css3 internet-explorer-9

CSS:

input:not([type=submit]):focus,
input:not([type=file]):focus,
textarea:focus {
    background: #f8f8f8;
    -webkit-box-shadow: 0 0 5px 0 rgba(67,67,67,0.3);
    box-shadow: 0 0 5px 0 rgba(67,67,67,0.3);
    outline-color:transparent;
    outline-style:none;
}
Run Code Online (Sandbox Code Playgroud)

IE9忽略input:not([type=file]):focus并在输入文件焦点上设置其框阴影,背景等样式.

任何想法都错了吗?

编辑:

如果它不受支持:为什么IE9造型如上?如果支持:为什么IE9忽略:not()?和上面的样式一样?

Dan*_*eld 5

IE9当然支持:not选择器 - caniuse(如评论中所述)

然而...

你的CSS没有按照你的想法行事.

在您当前的代码中第二条规则:

input:not([type=file]):focus
Run Code Online (Sandbox Code Playgroud)

覆盖第一条规则.所以这些属性将应用于除文件之外的所有输入元素 - 但包括提交 - 并且在所有浏览器中(不仅仅是IE9)

相反,你应该像这样链接选择器:

input:not([type=submit]):not([type=file]):focus, 
textarea:focus {
    background: #f8f8f8;
    -webkit-box-shadow: 0 0 5px 0 rgba(67,67,67,0.3);
    box-shadow: 0 0 5px 0 rgba(67,67,67,0.3);
    outline-color:transparent;
    outline-style:none;
    color: pink;
}
Run Code Online (Sandbox Code Playgroud)

结帐这个FIDDLE:

...您可以看到类型提交和文件的输入不会获得应用于焦点的样式,但是类型按钮的输入将获得应用于焦点的样式.

我在IE9中测试过,它工作正常.