divのデフォルトの動作を変更して、overflow:hiddenによってコンテンツがdivの下部からではなく、divの右側からオーバーフローするようにする方法はありますか?
1648 次
2 に答える
3
試してみてくださいwhite-space:nowrap
。そうすれば、コンテンツが新しい行に折り返されることはありません。
div{
overflow:hidden;
white-space:nowrap;
width:100px;
}
于 2012-11-20T16:40:47.173 に答える
2
はい。テキストを折り返さないようにします。
<div style="width:100px;height:30px; overflow:hidden; white-space:nowrap;">
Is there away to change the default behavior of a div so that
overflow:hidden causes the content to overflow out the right side
of a div, rather than out of the bottom of the div?
</div>
于 2012-11-20T16:43:00.770 に答える