我希望将html电子邮件中150px宽度的表格的文本限制为固定行数,例如:
Long text continues down the road into a lane and doesn't stop there我希望它看起来像这样:
Long text continues down
the road into a lane and...我将字符串截断为最多45个字符(包括省略号),但有时当出现一个长词时,它会变成三行:
Long text continues at
accelerating speed into the
road...理想情况下,我想打破单词加速,或者更确切地说,在第一行中填充尽可能多的字符,并继续到第二行,有没有办法在html中做到这一点?(我查看了自动换行功能,但显然并不是所有电子邮件客户端都支持它)
此外,由于这是电子邮件客户端,我不能做任何javascript等。
发布于 2017-04-24 19:14:24
这对我很有效,只要根据你的需要调整高度即可。
blog_content {
display: inline-block;
border: 0px;
height: 600px;
overflow: hidden;
}https://stackoverflow.com/questions/7238926
复制相似问题