Version: 2022.1
言語: 日本語
Multiple selectors
疑似クラス

Selector lists

A selector list is a comma-separated list of selectors that share the same style rule.

構文

A selector list consists of multiple selectors separated by commas:

selector1, selector2 {...}

The following two USS snippets have the same effect.

# container2 {
  background-color: pink;
  border-radius: 10px;
}

Button {
  background-color: pink;
  border-radius: 10px;
}
# container2, Button {
   background-color: pink;
     border-radius: 10px;
 }

その他の参考資料

Multiple selectors
疑似クラス