text-overflow:ellipsis; -o-text-overflow:ellipsis; overflow:hidden;在火狐下没有效果,如何解决?
来源:学生作业学帮网 编辑:学帮网 时间:2024/06/09 13:15:37
text-overflow:ellipsis; -o-text-overflow:ellipsis; overflow:hidden;在火狐下没有效果,如何解决?
使用text-overflow:ellipsis对溢出文本显示省略号有两个好处,一是不用通过程序限定字数;二是有利于SEO.需要使用对对溢出文本显示省略号的通常是文章标题列表,这样处理对搜索引擎更友好,因为标题实际上并未被截字,而是局限于宽度而未被显示而已.
通常的做法是这样的:
1.overflow:hidden;
2.text-overflow:ellipsis;
3.-o-text-overflow:ellipsis;
4.white-space:nowrap;
5.width:100%;
其中,overflow:hidden和white-space:nowrap都是必须的否则不会显示省略号;-o-text-overflow:ellipsis针对Opera;而宽度的设定主要是针对IE6;
该方法支持Internet Explorer,Safari,Chrome 和 Opera,但FF并不支持,不过可以通过Jquery来实现类似的效果.
下载这个Jquery插件:jQuery ellipsis plugin
调用方法:
1.$(document).ready(function() {
2.$('.ellipsis').ellipsis();
3.}
text-overflow:ellipsis是什么意思
text-overflow:ellipsis; -o-text-overflow:ellipsis; overflow:hidden;在火狐下没有效果,如何解决?
overflow:hidden;
text
我在JSP页面中定义一个body{.}, 在一个CSS中也定义了一个body{.}, 引用时JSP中的body会被覆盖吗JSP中:body { overflow-x: hidden; overflow-y: hidden;}CSS中:body{margin:0;text-align:center;font-family:Arial, Helvetica,
stack overflow at line:
什么是stack overflow
overflow:hidden;是什么意思?
numeric overflow是什么意思
overflow什么意思
overflow metabolism是什么意思
queue overflow是什么意思
帮看看这段代码是什么意思.jysdfecss{width:5px; height:5px; clear:both; text-indent:10px;}.jyyksdf{margin:5px; padding:0; overflow:hidden;}.jycsdfe{width:5px; height:5px; clear:both; text-indent:10px;}.jyvcbodsf{margin:5px; padding:0; overf
ext-overflow:ellipsis;什么意思
#footersite{clear:both; display:block; overflow:hidden; text-align:center; margin:0px 10px; padding-bottom:0; z-index:11; border-top:1px #E0E0E0 solid; color:#888}#footersite h5,#footersite h6{display:block; margin:0; padding:0; line-height:normal; f
Stack overflow at line:解决办法,实际的
overflow属性我会用,但overflow-x和y不明白什么意思overflow-x 水平溢出overflow-y 垂直溢出呈现的效果是怎么样的?
your text