需要使用权“文本溢出”当“方向”被设置为“rtl” [英] Needs use right "text-overflow" when "direction" is set to "rtl"
本文介绍了需要使用权“文本溢出”当“方向”被设置为“rtl”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在文本前面加上...,只显示最后一部分,当它填充div。
是正常的
< span class =file-upload-statusstyle =max-width:200px>
C:\fakepath\996571_1398802860346752_2094565473_n.jpg
< / span>
< br />
< span class =file-upload-statusstyle =max-width:200px>
C:\fakepath\1.jpg
< / span>
这里是我有:
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
I need to put "..." in the front of text and show only last part of it, when it fills div.
And do nothing when it is normal
<span class="file-upload-status" style="max-width:200px">
C:\fakepath\996571_1398802860346752_2094565473_n.jpg
</span>
<br/>
<span class="file-upload-status" style="max-width:200px">
C:\fakepath\1.jpg
</span>
Here is what i have : http://jsfiddle.net/CBUH4/5/
Here is what i need :
Is it possible to do by Css, without using JavaScript or jQuery.
解决方案
Maybe something like this: http://jsfiddle.net/CBUH4/8/
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
这篇关于需要使用权“文本溢出”当“方向”被设置为“rtl”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文