ITeye博客

纯css实现所有浏览器下的ellipsis

i_love_sc · 2010-04-22 10:51 · Javascript · Web前端 · Markdown

css内容:

 

overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
-moz-binding: url('ellipsis.xml#ellipsis');

 

在css同级目录下面ellipsis.xml的内容:

 

<?xml version="1.0"?>
<bindings xmlns="http://www.mozilla.org/xbl" xmlns:xbl="http://www.mozilla.org/xbl" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 <binding id="ellipsis">
  <content>
   <xul:window>
    <xul:description crop="end" xbl:inherits="value=xbl:text">
     <children/>
    </xul:description>
   </xul:window>
  </content>
 </binding>
</bindings>

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。