在 CSS 中,符号波浪号 (~) 被称为后续同级组合器(也称为波浪号或波浪线或旋转或通用同级选择器)。顾名思义,它由分隔两个简单选择器序列的“波浪号”(U+007E,~)字符。由两个序列表示的元素在文档树中共享相同的父元素。它用于选择第一个序列之前的所有第二个序列(不一定是立即),或者简单地说,选择作为指定元素的兄弟的所有元素。
句法:
first-sequence ~ second-sequence {
/* property:value; */
}
例子:
CSS ~ Selector
GeeksforGeeks
Sudo Placement is back to help you this placement
season. Prepare for the Recruitment drive of
product-based companies like Microsoft, Amazon,
Adobe, etc with our free online placement preparation
course. The course focuses on various MCQ's & Coding
question likely to be asked in the interviews & make
your upcoming placement season efficient and successful.
Sudo Placement is back to help you this placement
season. Prepare for the Recruitment drive of
product-based companies like Microsoft, Amazon,
Adobe, etc with our free online placement preparation
course. The course focuses on various MCQ's & Coding
question likely to be asked in the interviews & make
your upcoming placement season efficient and successful.
输出: