CSS截斷字元

來源:互聯網
上載者:User
white-space:nowrap 不換行
table裡面使用style="width:400px; overflow:hidden; text-overflow:ellipsis;"是沒效果的 嵌套DIV或者其他的..
居然還有nobr 方便
<div style="width:400px; overflow:hidden; text-overflow:ellipsis;"><a href="ShowNews.aspx?id=<%# DataBinder.Eval(Container.DataItem, "news_id")%>" title="<%# DataBinder.Eval(Container.DataItem, "news_title")%>"><nobr><%# DataBinder.Eval(Container.DataItem, "news_title")%></nobr></a></div>
相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.