文章标题字数限制 如图 这种一行内标题字数不一致 该怎样控制? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这样的情况,我宁愿考虑css控制而不是php控制 可以使用css控制,overflow:hidden; <!DOCTYPE html ><html><head><meta charset="utf-8" /><title>无标题文档</title><style type="text/css">*{margin:0;padding:0; list-style:none}html{ height:100%;}body{ font:normal 12px/24px Arial, Helvetica, sans-serif; color:#666; position:relative; height:100%;}a{ text-decoration:none; color:#999;}a:hover{color:#000}.text li{width:15em; height:1.5em; line-height:1.5em; overflow:hidden;color:#00F;}.text li a{ position:relative; display:block; width:13em; overflow: visible; word-break:break-all; word-wrap: break-word; }*+html .text li a{ overflow:hidden;white-space:nowrap; text-overflow:ellipsis; }<!--兼容ie-->*html .text li a{ overflow:hidden;white-space:nowrap; text-overflow:ellipsis; }<!--兼容ie-->.text li a:after{ content:"..."; position:absolute;bottom:1.5em;right:-15px;}<!--兼容firefox opera--></style></head><body><ul class="text"><li><a href="#">ssssssssssssssssssssssssssssssssssssssss</a></li> <li><a href="#">这是一个很伤心的夜下着有些伤夜下着有些伤夜下雨</a></li> <li><a href="#">这是一个下伤心的雨</a></li> <li><a href="#">这伤心的有些伤心的雨</a></li> <li><a href="#">这是一个很sdfsdfsdfsdf下着有些有些有些的雨</a></li> <li><a href="#">这心的夜下着有些伤心的雨</a></li></ul></body></html>网上找的 你可以试一下 给标签加CSS如.label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;} 关于验证码值的问题 php输出word内容格式丢失如何解决?? 问题的问题:如何让访客使用新浪微博账号登录到自己的网站? dreamweaver怎么使用正则表达式 变量不存在,就会报错!! preg_replace_callback Allowed memory error 分组排序,需要数量最多的结果,请达人指点! 表单中对值的判断 关于XML和Xslt的问题,有空的进来帮个忙 又有cookie的问题 PHP 读取word 并转成图片 物品掉落概率表的设计模式问题
<html>
<head>
<meta charset="utf-8" />
<title>无标题文档</title>
<style type="text/css">
*{margin:0;padding:0; list-style:none}
html{ height:100%;}
body{ font:normal 12px/24px Arial, Helvetica, sans-serif; color:#666; position:relative; height:100%;}
a{ text-decoration:none; color:#999;}
a:hover{color:#000}
.text li{width:15em; height:1.5em; line-height:1.5em; overflow:hidden;color:#00F;}
.text li a{ position:relative; display:block; width:13em; overflow: visible; word-break:break-all; word-wrap: break-word; }
*+html .text li a{ overflow:hidden;white-space:nowrap; text-overflow:ellipsis; }<!--兼容ie-->
*html .text li a{ overflow:hidden;white-space:nowrap; text-overflow:ellipsis; }<!--兼容ie-->
.text li a:after{ content:"..."; position:absolute;bottom:1.5em;right:-15px;}<!--兼容firefox opera-->
</style>
</head>
<body>
<ul class="text">
<li><a href="#">ssssssssssssssssssssssssssssssssssssssss</a></li>
<li><a href="#">这是一个很伤心的夜下着有些伤夜下着有些伤夜下雨</a></li>
<li><a href="#">这是一个下伤心的雨</a></li>
<li><a href="#">这伤心的有些伤心的雨</a></li>
<li><a href="#">这是一个很sdfsdfsdfsdf下着有些有些有些的雨</a></li>
<li><a href="#">这心的夜下着有些伤心的雨</a></li>
</ul>
</body>
</html>
网上找的 你可以试一下