我想改變SCORE的位置從右到左,從左到右或反過來,但分數的位置不應該改變。我嘗試了幾種組合和選項,但沒有幫助。如何改變使用CSS的位置
尺寸和寬度等....一切都正確定義,只是我們需要改變SCORE的位置
什麼,我試圖做的是:
實際:左得分 |左DIV中間DIV右DIV | Right Score
預計:左DIV | 左分數中檔DIV 右分數 | Right DIV
or
Actual:Left DIV | 左分中檔DIV右DIV | Right Score
預計:右DIV | 右劃痕中東DIV 左劃痕 |左DIV
或
預計:左DIV | 左劃痕中東DIV 右劃痕 |右DIV
div.team-info.team-pre-info.lpanel.Soccer
div.team-info.team-final-in-info.lpanel.Soccer
div.score-box.score-box-home.Soccer {
\t float:right;
}
div.team-info.team-pre-info.rpanel.Soccer
div.team-info.team-final-in-info.rpanel.Soccer
div.score-box.score-box-home.Soccer {
\t float:left;
}
<div style="color:#0000FF;width:500px">
<div class="team-info team-pre-info lpanel Soccer" style="display:inline;">
Left DIV </div>
<div class="score-box score-box-home Soccer" style="display:inline";> | Left Score</div>
<div style="display:inline;">
Middle DIV
</div>
<div class="team-info team-pre-info rpanel Soccer" style="display:inline;">
Right DIV </div>
<div class="score-box score-box-way Soccer" style="display:inline"; >
| Right Score </div>
</div>
https://jsfiddle.net/wf2y7m01/
爲什麼不乾脆改變HTML ......當然這不是CSS應該解決的問題? –
你看過flexbox並訂購了嗎? https://css-tricks.com/almanac/properties/o/order/ – coopersita