我有一个带有多个<p>
标签的div,div是固定的宽度和高度,我只想用“.”替换溢出父文件的文本。
<div class="container" style="width:200px; height:400px; overflow:hidden;">
<p class="pText">one one one one one one one one one one one one </p>
<p class="pText" >two two two two two two two two two two two two </p>
<p class="pText">three three three three three three three three </p>
<p class="pText">four four four four four four four four four four </p>
<p class="pText">five five five five five five five five five five </p>
<p class="pText">six six six six six six six six six six six six six </p>
</div>
在某个时候,文本溢出父文件,此时我想用“.”替换溢出词。
就像这样:
___________________________
| one one one one one one |
| two two two two two two |
| two two |
| three three three three |
| three three three |
| four four four four four|
| four |
| five five five five ... |
|_________________________|
的东西是文本横向包装只是很好。当它太长的时候,它会被垂直地剪下来,这很好。我需要的是完全删除半可见的行,用“.”替换前面的最后一个单词
我想CSS是不可能的,所以我不介意尝试使用jQuery。
非常感谢你的帮助!
发布于 2013-03-31 07:00:40
https://stackoverflow.com/questions/15729527
复制相似问题