「CSS」複数のセレクタを指定するサンプル
構文
.セレクタA .セレクタB {
//some code}
CSSコード
.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コード
<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>