接近完美的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>

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.