white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100px;
w开发者_StackOverflow中文版idth: 100px;
http://jsfiddle.net/bhellman1/qQdDq/
white-space is taking effect, but width is not? Why? Is it something to do with the CITE tag or perhaps Chrome?
cite
is an inline element, so you have to specify display: block
or display: inline-block
for it to be constrained to width.
<cite>
is inline, it doesn't have width. if you add display:block
or display:inline-block
, on the other hand...
精彩评论