首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > CSS >

overflow: hidden;似乎不被firefox支持,怎么处理?

2012-02-03 
overflow: hidden似乎不被firefox支持,怎么办???我用了以下代码实现新闻标题定长截断:CSS code.ellipsis_

overflow: hidden;似乎不被firefox支持,怎么办???
我用了以下代码实现新闻标题定长截断:

CSS code
.ellipsis_div{               overflow:hidden;       text-overflow:ellipsis;       white-space:nowrap;       wzy:expression(void(this.title=this.innerText));     } 


在IE内核的浏览器里是正常的,但用firefox测试就没有被截断,
网站都做好了,大规模改动很困难,有什么简单的办法补救?

[解决办法]
设定宽度
[解决办法]
没有宽度和高度吗?
[解决办法]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>firefox div </title>
<style type="text/css">
.w {width:400px;}
.d1 {height:50px;float:left;}
.d2 {height:50px;background:#F9EDFA;border:2px dotted #A63DAD;overflow:hidden}
</style>
</head>

<body>
<div class="w">
 <div class="d1">aaaaaaaaaaaaaaaaaaaaaaaa</div><div class="d2">bbbbbbbbbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</div>
</div>
</body>
</html>
[解决办法]
expression(void(this.title=this.innerText));
改成:expression(void(this.title=this.innerHTML));试试
[解决办法]
inline状态下的a?

热点排行