What does the “~” (tilde/squiggle/twiddle) CSS selector mean?

后端 未结 5 1278
孤街浪徒
孤街浪徒 2020-11-21 05:13

Searching for the ~ character isn\'t easy. I was looking over some CSS and found this

.check:checked ~ .content {
}

What does

5条回答
  •  后悔当初
    2020-11-21 05:55

    General sibling combinator

    The general sibling combinator selector is very similar to the adjacent sibling combinator selector. The difference is that the element being selected doesn't need to immediately succeed the first element, but can appear anywhere after it.

    More info

提交回复
热议问题