文本溢出无法在IE上运行

时间:2016-10-14 11:33:54

标签: html css internet-explorer sharepoint-2013

我在SharePoint 365中编写了一些CSS,在这里我尝试这样做: https://codepen.io/srekoble/pen/EgmyxV

我在Chrome中完美运行,甚至在codepen版本上也是如此。但是,当它应用于我的实时版本时,它只是在达到最大宽度限制时不会隐藏文本。

这是我自己的代码。

td.ms-cellstyle.ms-vb2 {
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
   max-width: 50px;
}

结果如下:

Image

看起来,CSS规则似乎不适用于IE,并且不限制要显示的文本。

以下是该块的HTML。

<td class="ms-cellstyle ms-vb2" role="gridcell" style="overflow: hidden; display: inline-block; white-space: nowrap; text-overflow: ellipsis; max-width: 20px;"><a class="ms-listlink" onclick="EditLink2(this,21);return false;" onfocus="OnLink(this)" href="https://rosendahldesigngroup.sharepoint.com/_layouts/15/listform.aspx?PageType=4&amp;ListId=%7BA8CAC965%2D8031%2D43A4%2DAD23%2D0DD14BE6012D%7D&amp;ID=116&amp;ContentTypeID=0x010200283C7299F6299B4D99C5E4ACE117C0C1" target="_self">BFA arr. HHX innovation og designlinie i Lyngby</a><span class="ms-newdocument-iconouter"><img title="new" class="ms-newdocument-icon" alt="new" src="/_layouts/15/images/spcommon.png?rev=44"></span></td>

0 个答案:

没有答案