DedeCMS标题1行2列,字数智能控制,碎片新闻

早上好,给您新鲜的问候,温暖的祝福,清晨,美好的开端,祝您今天精神振奋,精力充沛,心情愉快,一切都很好!

DedeCMS调用一行2列字数智能控制方法,字数智能控制,碎片新闻(参照烈火小编昨日发布的网页特效)。

感谢作者的辛苦劳动!

DedeCMS 调用一行2列字数智能控制方法 本代码基于DedeCMS开发。 使用时请注意: titlelen请大于整个li标签内的一半字符最好大于4-6个; 如果感觉显示效果不好或出错可以用短标题来做出调整;

调用代码:

Copy to ClipboardLiehuo.Net Codes引用的内容:[www.veryhuo.com]
{dede:arclist row='4' titlelen='20' } 
[field:global name=autoindex runphp="yes"](@me % 2 == 0)?@me="":@me="<li>·";[/field:global]<a rel="nofollow noopener noreferrer" href="[field:arcurl/]" target='_blank'>[field:array runphp='yes'] if (@me['shorttitle']=='') @me=@me['title'];else @me=@me['shorttitle'];[/field:array] </a>[field:global name=autoindex runphp="yes"](@me % 2 == 0)?@me="</li> 
":@me="";[/field:global] 
{/dede:arclist}

效果演示:

<!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" content="text/html; charset=gb2312" />
<title>dede调用一行2列字数智能控制方法</title>
<style type="text/css">
<!--
body {
margin: 0px;
padding: 0px;
}
#cs  {
width: 200px;
font-size: 12px;
list-style-type: none;
padding: 10px;
background-color: #f5f5f5;
border: 1px solid #c1c1c1;
margin-top: 40px;
margin-right: auto;
margin-bottom: 40px;
margin-left: auto;
}
#cs a {
color: #333333;
text-decoration: none;
}
#cs li {
table-layout:fixed;
width: 200px;
overflow: hidden;
text-overflow:ellipsis;
height: 25px;
line-height: 25px;
}
p {
text-align: center;
font-size: 12px;
}
-->
</style>
</head>
<body>
<ul id="cs">
<li>·<a rel="nofollow noopener noreferrer" href="#">这里是标题长度控制最</a> <a rel="nofollow noopener noreferrer" href="#">这里是标题长度控制最</a></li>
<li>·<a rel="nofollow noopener noreferrer" href="#">这里是标题长</a> <a rel="nofollow noopener noreferrer" href="#">这里是标题长度控制最</a></li>
</ul>
<!--
下面是调用代码,可根据自己需要做相应的调整
{dede:arclist row='4' titlelen='20' }
[field:global name=autoindex runphp="yes"](@me % 2 == 0)?@me="":@me="<li>·";[/field:global]<a rel="nofollow noopener noreferrer" href="[field:arcurl/]"  target='_blank'>[field:array runphp='yes'] if (@me['shorttitle']=='') @me=@me['title'];else @me=@me['shorttitle'];[/field:array] </a>[field:global name=autoindex runphp="yes"](@me % 2 == 0)?@me="</li>
":@me="";[/field:global]
{/dede:arclist}
-->
<p>DedeCMS 调用一行2列字数智能控制方法<br /><br />

本代码基于DedeCMS开发。<br /><br />
<font color="#FF0000">使用时请注意:</font><br /><br />
<font color="#FF0000">titlelen请大于整个li标签内的一半字符最好大于2-4个;</font><br /><br />
<font color="#FF0000">如果感觉显示效果不好或出错可以用短标题来做吃调整;</font><br /><br />
版权归作者所有,转载请标明!<br /><br />
网站支持<a rel="nofollow noopener noreferrer" href="http://www.dede58.com">昆网</a></p>
</body>
</html>
<br /><center>如不能显示效果,请按Ctrl+F5刷新本页,更多网页代码:<a rel="nofollow noopener noreferrer" href='http://www.dede58.com/' target='_blank'>http://www.dede58.com/</a></center>

到此这篇关于DedeCMS标题1行2列,字数智能控制,碎片新闻就介绍到这了。生活中最重要的事情不是胜利,而是奋斗;不是征服,而是努力拼搏。更多相关DedeCMS标题1行2列,字数智能控制,碎片新闻内容请查看相关栏目,小编编辑不易,再次感谢大家的支持!

您可能有感兴趣的文章
dedecms如何实现任意页面调用当前会员信息的方

DedeCMS织梦判断是否有二级栏目输出HTML代码

织梦dedecms dede:arclist输出取消换行符

dedecms文章添加字段填栏目id,内容页调用字段里的栏目文章

dedeCMS首页列表页文章页调用tag的方法