html - 我怎样才能 "limit"<p> 中的文本?

标签 html text out

我这里有一个邮件模板时事通讯: http://www.newsletter.vendopor.com/m29-04-13/index2.html

但在最后,有一个包含该文本的段落: Por favor, envía este correo a las personas que creas le puede ayudar nuestro...

还有这段文字,走出段落(我在css中有一个width 380属性,一直往外走)。

在页面的末尾

我在谷歌上搜索过,但找不到解决方案

在 Chrome 上工作正常,但在 Mozilla(最新版本)中文本会消失。

非常感谢您的帮助

最佳答案

您可以使用text-overflow: ellipsis;

div {
    width:200px; 
    overflow:hidden; 
    border:1px solid #f00;
    text-overflow:ellipsis;
    white-space:nowrap; 
}
<div>This is very very long text This is very very long text This is very very long text </div>

祝你好运......

关于html - 我怎样才能 "limit"<p> 中的文本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16193279/

相关文章:

HTML Viber 链接到特定号码

php - 无法在 Laravel 中获取 app.scss 的完整文件

javascript - 将类名添加到使用 AJAX 和 PHP 数组生成的范围

text - 自然语言生成 - 如何超越模板

c - 程序打印不必要的 'ÿ' 字符

apache-flex - 使用 AS3 放大和缩小

express - Paypal 快速结账 => 错误 : Security header is not valid

html - 使用翻转切换开关,当切换为 "off"或 "on"时,我没有收到警报消息

c - 如何比较C中文本的字符?

jquery - 打破 Jquery 每个循环的问题?