CSS“和” selector - 我可以选择有多个标签的元素吗? [英] CSS "and" selector - Can I select elements that have multiple tags?
本文介绍了CSS“和” selector - 我可以选择有多个标签的元素吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图选择所有具有 .checked
和 .featured
标签的元素。所以基本上,我要找的是一个和选择器;
I'm trying to select all of the elements that have both .checked
and .featured
tags. So basically, what I'm looking for is an "and" selector; I don't know if there is one or not.
这样的情况是否有解决方法?
Is there any workaround for cases like this?
推荐答案
使用两者(之间没有空格)
.checked.featured{
// ...
}
b $ b
参考: http://www.w3.org/TR/selectors/#class- html
这篇关于CSS“和” selector - 我可以选择有多个标签的元素吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文