「CSS」複数のセレクタを指定するサンプル

2020年12月1日

構文
.セレクタA .セレクタB {
//some code}
CSSコード

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
.sampleA .sampleB .sampleC {
font-weight: bold;
background : red;
}
.sampleA .sampleB .sampleC { font-weight: bold; background : red; }
.sampleA .sampleB .sampleC {
  font-weight: bold;
  background : red;
}

htmlコード

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<span class="sampleA sampleB">
<span class="sampleC">
test data
</span>
</span>
<span class="sampleA sampleB"> <span class="sampleC"> test data </span> </span>
<span class="sampleA sampleB">
  <span class="sampleC">
   test data
   </span>
</span>

 

CSS

Posted by arkgame