非文本元素的CSS nowrap? [英] CSS nowrap for other than text elements?
问题描述
当内容不仅仅是文本内容时,是否有避免包装 div
的
内容的方法?几个按钮?
Is there a way to avoid wrapping of a
这篇关于非文本元素的CSS nowrap?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
#foo {white-space:nowrap; width:100px;}
< div id =foo > < input type =buttonvalue =hello/> < input type =buttonvalue =hello/> < input type =buttonvalue =hello/> < input type =buttonvalue =hello/> < input type =buttonvalue =hello/> < input type =buttonvalue =hello/> < input type =buttonvalue =hello/>< / div>
div
's
content when the content is not just text e.g. several buttons?white-space:nowrap;
should do the trick.#foo {
white-space:nowrap;
width: 100px;
}
<div id="foo">
<input type="button" value="hello"/>
<input type="button" value="hello"/>
<input type="button" value="hello"/>
<input type="button" value="hello"/>
<input type="button" value="hello"/>
<input type="button" value="hello"/>
<input type="button" value="hello"/>
</div>