小编Adr*_*ton的帖子

分组Css选择器(即子或选择器)

是否可以将选择器嵌套或分组?例如,我有以下css:

.feature > *:hover > .info,
.feature > .select > .info   {bottom:0;}
.feature > *:hover > .img,
.feature > .select > .img,
.feature > *:hover > .link,
.feature > .select > .link   {top:-25px;bottom:51px;}
Run Code Online (Sandbox Code Playgroud)

是否有可能以类似于以下伪CSS的方式对许多选择器进行分组(我使用括号,但我意识到这不起作用):

.feature > (*:hover,.select) > .info         {bottom:0;}
.feature > (*:hover,.select) > (.img,.link)  {top:-25px;bottom:51px;}
Run Code Online (Sandbox Code Playgroud)

我注意到CSS3有:not()选择器,但我找不到:或()选择器.

css css-selectors css3

3
推荐指数
1
解决办法
133
查看次数

标签 统计

css ×1

css-selectors ×1

css3 ×1