接近完美的CSS標題、列表溢出隱藏

來源:互聯網
上載者:User
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" c />
<title>無標題文 檔</title><style type="text/css">
<!--
.div {
padding:0;
    list-style-type: none;
line-height:22px;
margin-bottom:10px;
background:#CCCCCC;
font-size:12px;
word-break:break-all;/*設定或檢索對象內文本的字內換行行為。尤其在出現多種語言時(當前任意字內斷開並換行,這楊不會出現半個 字情況)*/
height:22px;/*設定了高度,CSS才知道文本是否超出了容器換行*/
overflow:hidden;/*隱藏超出的部分*/

}
-->
</style>
</head>
<body>
<div style="width:200px;">
<ul>
<li class="div">¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢¢</li>
<li class="div">一三五六七八九十是是時刻處了三¢¢¢案上籃得分</li>
<li class="div">www.zgcsd.com上地平台sssssssss¢¢¢ssssss</li>
<li class="div">ssssssssssssssssssssssssssssssssssssssssssssssssssssssssss</li>
<li class="div">sss sss sss sssss ssss sssssss ssssss sss ssssssssssssssss sss</li>
</ul>
</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.