本文介绍了IE9和IE8中的链接文本无法获取省略号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<div class="jspPane" style="padding: 0px; top: 0px; width: 138px;">
<ul style="display: block;">
<li class="hyperlink" >
<span class="xyz1" style="background-image:url(/Content/images/icon_link_16x7.png);"> View on Bing Maps website</span>
</li>
</ul>
</div>
//// class //
////class //
ul li {
color: #137AFF;
height: 25px;
overflow: hidden;
padding-left: 5px;
padding-right: 4px;
padding-top: 4px;
text-align: left;
text-overflow: ellipsis;
width: 138px;
}
.hyperlink {
color: #13A3F7;
font-size: 12px !important;
text-decoration: underline;
white-space: nowrap;
}
我的问题是我想在最内层跨度的文本中获得省略号。我不能得到IE9和IE8上的省略号。它的作品在Fire Fox中很好。我尝试删除span并使用div,但它没有帮助。如果我错过任何东西,请让我知道。所有的帮助是赞赏。谢谢。
My problem is I want to get an ellipsis over the text inside the innermost span. I cannot get the ellipsis on IE9 and IE8. Its works fine in Fire Fox. I tried removing span and using div instead , but it did not help. Please let me know if I am missing out anything. All help is appreciated. Thank you.
推荐答案
据我所知,阅读的开发者文章,你需要使用 -ms-text-overflow
:
ul li {
color: #137AFF;
height: 25px;
overflow: hidden;
padding-left: 5px;
padding-right: 4px;
padding-top: 4px;
text-align: left;
text-overflow: ellipsis;
-ms-text-overflow: ellipsis;
width: 138px; /* note that this width will have to be smaller to see the effect */
}
这篇关于IE9和IE8中的链接文本无法获取省略号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!