Css div溢出右

Css div溢出右,css,html,overflow,Css,Html,Overflow,是否需要更改div的默认行为,以便overflow:hidden会导致内容从div的右侧溢出,而不是从div的底部溢出?请尝试空白:nowrap。这样,内容就不会换行 div{ overflow:hidden; white-space:nowrap; width:100px; } 尝试空白:nowrap。这样,内容就不会换行 div{ overflow:hidden; white-space:nowrap; width:100px; } 对。请

是否需要更改div的默认行为,以便overflow:hidden会导致内容从div的右侧溢出,而不是从div的底部溢出?

请尝试
空白:nowrap
。这样,内容就不会换行

div{
    overflow:hidden;
    white-space:nowrap;
    width:100px;
}

尝试
空白:nowrap
。这样,内容就不会换行

div{
    overflow:hidden;
    white-space:nowrap;
    width:100px;
}

对。请不要将文本换行:

<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>

是否需要更改div的默认行为,以便
溢出:隐藏导致内容从右侧溢出
一个div,而不是从div的底部?

是。请不要将文本换行:

<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>

是否需要更改div的默认行为,以便
溢出:隐藏导致内容从右侧溢出
一个div,而不是从div的底部?

看看如何在CSS中使用overflow-x和overflow-y。@Diodeus这些属性与他的问题无关。看看如何在CSS中使用overflow-x和overflow-y。@Diodeus这些属性与他的问题无关。啊,谢谢!正是我需要的。非常感谢。(我还不能投票,因为我的声望不够高。)啊,谢谢!正是我需要的。非常感谢。(我还不能投票,因为我的声望不够高。)