有沒有改變一個div的默認行爲,使溢出:隱藏導致內容溢出一個div的右側,而不是出底部的div?div overflow right
0
A
回答
3
嘗試white-space:nowrap
。這樣內容將不會換行到新行。
div{
overflow:hidden;
white-space:nowrap;
width:100px;
}
+1
啊,謝謝!正是我需要的。非常感謝。 (因爲我沒有足夠的聲望,我還不能投票。) – Ryan
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>
相關問題
- 1. Left/Right position a div
- 2. Drop in right div
- 3. Window.Print()Div和Overflow-x?
- 4. dock div to right issue
- 5. set div 50%height with overflow auto
- 6. center right right
- 7. CSS overflow-y:visible,overflow-x:scroll
- 8. Float right fixed svg in div
- 9. float right property block another div
- 10. CSS flex div image to the right
- 11. css div margin-right not working
- 12. 用Clipped overflow創建一個'trapezium'形div
- 13. overflow-y覆蓋overflow-x
- 14. Left,Right和Center Align Div div下的子div div
- 15. Integer not right right
- 16. Draggable overflow
- 17. 元素流動限制resposive overflow div
- 18. CSS overflow:隱藏限制div的寬度
- 19. JQuery UI Resiable by right-right corner
- 20. HTML/CSS hack允許overflow-x:auto&overflow-y:visible?
- 21. CSS:將div放在float的右邊:right
- 22. 放置3個HTML div; 1 left 2 right
- 23. jQuery Smooth Div Scroll - Right Hotspot not activating
- 24. 2 Divs Float Right - Not a right order
- 25. CSS Text Overflow
- 26. Html position fixed bugs screen to right
- 27. image to the right right and bottomm left
- 28. 沒有設置div的寬度,顯示div overflow-x滾動條?
- 29. parent-div overflow-y打破子div的邊界
- 30. CSS:絕對定位div超出overflow範圍:隱藏?
看看如何在CSS中使用overflow-x和overflow-y。 –
@Diodeus這些屬性與他的問題無關。 –