CSS“选择器”之间的东西是什么,称为? [英] What is that thing between CSS "selectors" called?
本文介绍了CSS“选择器”之间的东西是什么,称为?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
:
p + p
是:
- 关系运算符
- 基于位置的条件
- 还有什么吗?
我不知道该叫什么。是否有官方名称?
(以及 abc
在 abc
?中的 a
$ b
解决方案
根据 http://www.w3.org/TR/CSS2/selector.html#selector-syntax ,它们被称为组合器。
感谢Duncan Babbage指出有(或只有)其中三个:
- 空格字符=后裔
-
>
=子 -
+
plus mark = adjacent following(next)sibling - 而CSS3添加了一个符号
〜
=一般关系同级
What do you call these:
body > p + p
in a CSS selector? Are they:
- Relational operators
- Position-based criteria
- Something else?
I just have no idea what to call them. Is there an official name?
(And, also, are there official names for a b c
in a b c, d e f
and a
in a b c
?)
解决方案
According to http://www.w3.org/TR/CSS2/selector.html#selector-syntax they are called "combinators".
Thanks to Duncan Babbage for pointing out there are (or were) only three of them:
- space character = descendant
>
= child+
plus mark = adjacent following (next) sibling- And CSS3 adds a tilde
~
= general following sibling
这篇关于CSS“选择器”之间的东西是什么,称为?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文