div与li自动给长标题加省略号

div与li自动给长标题加省略号

<!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>

<title>div与li自动截断过长的文本</title>

<meta http-equiv=”content-type” content=”text/html;charset=gb2312″>

<style type=”text/”>

li{

 width:200px;

 white-space:nowrap;

 text-overflow:elliis;

 -o-text-overflow:ellipsis;

 overflow: hidden;

}

div{

 width:200px;

 white-space:nowrap;

 text-overflow:ellipsis;

 -o-text-overflow:ellipsis;

 overflow: hidden;

}

</style>

</head>

<body>

<div><a href=”http://www.111cn.net” target=”_blank”>www.111cn.net,站长乐园</a></div>

<ul>

 <li><a href=”http://www.111cn.net” target=”_blank”>www.111cn.net,站长建站乐园</a></li>

 <li><a href=”http://www.111cn.net” target=”_blank”>www.111cn.net,站长建站乐园</a></li>

 <li><a href=”http://www.111cn.net” target=”_blank”>www.111cn.net,站长建站乐园</a></li>

 <li><a href=”http://www.111cn.net” target=”_blank”>www.111cn.net,站长建站乐园</a></li>

 <li><a href=”http://www.111cn.net” target=”_blank”>www.111cn.net,站长建站乐园</a></li>

</ul>

</body>

</html>

div与li自动给长标题加省略号

相关文章:

你感兴趣的文章:

标签云: