我只想問我的html代碼在這裏,我有點問題,當涉及到我的div大小。當我把div的寬度設置爲70px時,內容仍然流過div,我想要的是,當div的高度超過div的寬度時,div的高度會自動調整。我的div的寬度是固定的,而內容仍然溢出
有幫助嗎? 繼承人我的代碼。在此先感謝
<div class = "center"> the quick brown fox jumps over the lazy dog.the quick brown fox jumps over the lazy dog.the quick brown fox jumps over the
lazy dog.the quick brown fox jumps over the lazy dog.the quick brown fox jumps over the lazy dog.the quick brown fox jumps
over the lazy dog.the quick brown fox jumps over the lazy dog.the quick brown fox jumps over the lazy dog.the quick brown
fox jumps over the lazy dog.the quick brown fox jumps over the lazy dog.the quick brown fox jumps over the lazy dog.the
quick brown fox jumps over the lazy dog.the quick brown fox jumps over the lazy dog.the quick brown fox jumps over the lazy
dog.the quick brown fox jumps over the lazy dog. </div>
<style> .center{width:70px;} </style>
在jsfiddle.net上做一個代碼示例 – SVS
應該正常工作。您是否嘗試禁用/刷新瀏覽器緩存? – speakr
http://jsfiddle.net/BQnae/這裏完美的工作 – treng