如何在Firefox中显示HTML元素的overflew文本的省略号? [英] How to show ellipses to the overflew text for HTML elements in Firefox?

查看:252
本文介绍了如何在Firefox中显示HTML元素的overflew文本的省略号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要显示省略号(...)如果文本溢出在DIV和SPAN。

I need to show the ellipses(...) if the text overflows in DIVs and SPANs.

我有一个CSS属性 text-overflow:ellipses

I have a CSS attribute called text-overflow:ellipses. But this works only in IE.

我想在其他浏览器(如Firefox / Chrome等)中显示相同的内容。

I want to display the same in other browsers like Firefox/Chrome etc..

推荐答案

本文(http://mattlaine.com / blog /?p = 49)解释了如何为Firefox执行此操作。

This article (http://mattlaine.com/blog/?p=49) explains how to do it for Firefox.

还有一个jQuery插件,它将为Firefox添加省略号。

There is also a jQuery plugin that will add the ellipses for Firefox.

text-overflow:ellipsis 适用于其他一些浏览器,如Safari。 Opera使用 -o-text-overflow

text-overflow: ellipsis works on a few other browsers, like Safari. Opera uses -o-text-overflow.

这篇关于如何在Firefox中显示HTML元素的overflew文本的省略号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆