當我嘗試應用簡單的CSS基於CSS選擇器不同組合的選擇器具有相同的CSS風格的一些DIV,它沒有得到應用。如果我爲每個選擇器組合單獨編寫此css,則它正在工作。我不明白爲什麼它失敗了。如果我的CSS選擇器工作,然後「左DIV |左得分」應該去右側。相同的css的類選擇器不工作的多個組合
的jsfiddle:https://jsfiddle.net/wf2y7m01/
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
div.team-info.team-pre-info.lpanel.Soccer
div.team-info.team-final-in-info.lpanel.Soccer
div.score-box.score-box-home.Soccer {
float:right;
}
div.team-info.team-pre-info.rpanel.Soccer
div.team-info.team-final-in-info.rpanel.Soccer
div.score-box.score-box-away.Soccer {
float:left;
}
</style>
</head>
<body>
<div style="color:#0000FF;width:500px">
<div class="team-info team-pre-info lpanel Soccer" style="display:inline;">
Left DIV
<div style="display:inline;"> | Left Score</div>
</div>
<div style="display:inline;">
Middle DIV
</div>
<div class="team-info team-pre-info rpanel Soccer" style="display:inline;">
<div style="display:inline;"> Right Score |</div>
Right DIV
</div>
</div>
</body>
</html>