> For the complete documentation index, see [llms.txt](https://lochiwei.gitbook.io/web/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lochiwei.gitbook.io/web/css/selectors/combinators.md).

# combinators

[CSS](/web/css.md) ⟩ [selectors](/web/css/selectors.md) ⟩ combinators

{% hint style="info" %}

{% endhint %}

{% tabs %}
{% tab title="💾 程式" %}

```css
A, B    /* A or B */

A.B    /* A (with class B) */

A B    /* B (descendent of A) */
A > B    /* B (direct child of A) */
A + B    /* B (next sibling of A) */
A ~ B    /* B (following sibling of A) */
```

{% endtab %}

{% tab title="👥 相關" %}

* [select direct children by JS](/web/css/selectors/direct-children-by-js.md)
  {% endtab %}

{% tab title="📘 手冊" %}

* [CSS](https://developer.mozilla.org/en-US/docs/Web/CSS) ⟩ [Next-sibling combinator](https://developer.mozilla.org/en-US/docs/Web/CSS/Next-sibling_combinator)
  {% endtab %}
  {% endtabs %}
