css制限文字列長における2つのdiv平行問題
741 ワード
cssで文字列を制限するには、divでのみspanでは使用できません.divのデフォルトは平行ではありません.
------------------------------------------------------------------------------------
2つのdivがどのように平行になるかは、styleのfloatプロパティを使用するだけです.
一つのスタイル「float:left」、もう一つのスタイル「float:right」でいいです
------------------------------------------------------------------------------------
2つのdivがどのように平行になるかは、styleのfloatプロパティを使用するだけです.
一つのスタイル「float:left」、もう一つのスタイル「float:right」でいいです
<style type="text/css">
.cutLen{
width:280px;
overflow:hidden;
white-space:nowrap;
text-overflow:ellipsis;
float: left;
}
</style>
<div class="cutLen">
</div>
<div style="float: right;">
hello world
</div>