在流体容器内连接文本 [英] Concatenating text within fluid container
问题描述
这是一个源自该问题的问题:
如何获得这一个正确的?
您可以简单地设置:
width:100%;
请参阅修改的小提琴: http://jsfiddle.net/blocknotes/jguaxbsg/2/
如果有足够的空间窗口,你可以看到整个句子,如果你限制窗口的省略号似乎削减了字符串。
It's a problem that derived originally from that one: Header misbehave on longer title
I'm using now:
.toolong {
width: 230px;
overflow:hidden;
white-space:nowrap;
text-overflow: ellipsis;
}
with @media (min-max width etc.)
and I want it to make width adapt to actual width of the container, not the screen width. Why is that? Because under, let's say, 768px I have stacked all the columns and container gets quite long with lot of unused space:
How to get this one right?
You could simply set:
width: 100%;
See the modified Fiddle: http://jsfiddle.net/blocknotes/jguaxbsg/2/
If there is enough space on the window you can see the whole sentence, if you restrict the window the ellipsis appear to cut the string.
这篇关于在流体容器内连接文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!