sql语句输出的时候格式化
$sql = "SELECT LEFT(字段名,限制的标题长度) AS title FROM 表名";
---------------------------------------
css格式化
css
.contents ul{ width:120px;
overflow:hidden;
//line-height:18px;
}
.contents ul li{
overflow:hidden;
}
.contents ul li a{
margin:0;
display:block;
width:100px;
white-space:nowrap;
float:left;
text-overflow:ellipsis;
overflow:hidden;
}
html