Css:not()选择器不支持其中的复杂选择器 [英] Css :not() selector not supporting complex selectors inside it

查看:117
本文介绍了Css:not()选择器不支持其中的复杂选择器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用CSS3 :not()选择器以及属性包含选择器可用,但在混合时两者都有问题,它无法正常工作。

With CSS3 both :not() selector as well as attribute contains selector are available, but while mixing the both there comes the problem, it is not working.

HTML:

<input type='text'/>
<input type='text' id="dasd_Date_asd"/>

CSS:

input[type='text']:not(input[id*='Date']) {
    display:none;
}



DEMO



谁能告诉我这里出了什么问题?

DEMO

Can anyone tell what is going on wrong here?

注意:我们没有权限更改标记。

Note: There is no privilege given to us for changing the markup.

推荐答案

你不能使用两个选择器:

You can't use two selectors in not:

input[type='text']:not([id*='Date']) {
  display: none;
}

<input type='text' />
<input type='text' id="dasd_Date_asd" />

选择器级别3不允许任何超过一个简单选择器

Selectors level 3 does not allow anything more than a single simple selector within a :not() pseudo-class.

这篇关于Css:not()选择器不支持其中的复杂选择器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆