CSS自動隱藏溢出的文字

來源:互聯網
上載者:User

 廢話少說,看了效果就知道我要說什麼了

 <html>
<head>
<style>
a
{
 overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
 width:100px;
}
a:hover
{
overflow:auto;
 color: #c00;
 text-decoration: underline;
 width:auto;
    white-space:normal;
 overflow:break-all;
}
</style>
</head>
<body>
<div  style=" width:100px; border:1px solid #000000;overflow:break-all;word-break:break-all">
<li><a href="http://blog.csdn.net/civerb"/>做網站開發,遇到技術難題怎麼辦?來“幻世錄”看吧,你能擷取到很大收穫哦。http://blog.csdn.net/civerb</a>
</li>
</div>

</body>
</html>

 

 

相關文章

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.