首页 > CMS > Discuz > 正文

discuz 门户上一篇,下一篇缩略图显示分享

2024-09-11 09:05:30
字体:
来源:转载
供稿:网友
到template/default/portal/view

<!--{if $article['prearticle']}--><em>{lang pre_article}<a href="{$article['prearticle']['url']}">{$article['prearticle']['title']}</a></em><!--{/if}-->                                <!--{if $article['nextarticle']}--><em>{lang next_article}<a href="{$article['nextarticle']['url']}">{$article['nextarticle']['title']}</a></em><!--{/if}-->



替换代码

<div class="a_photo">                                <!--{if $article['prearticle']}--><a href="{$article['prearticle']['url']}">                                <img src="image/xgt/$article['prearticle'][pic]" alt="$article['prearticle'][title]"/><li href="{$article['prearticle']['url']}">{lang pre_article}</li><!--{/if}--</a>        </div>                        <div class="next_photo">                                <!--{if $article['nextarticle']}--><a href="{$article['nextarticle']['url']}">                                <img src="image/xgt/$article['nextarticle']['pic']" alt="$article['nextarticle']['title']"/><li href="{$article['prearticle']['url']}">{lang next_article}</li></a>


我是分别给上一篇下一篇加了个DIV 方便好控制,如果有模板的找对应的文件view

02 css控制也给出
.a_photo { float:left;margin:-129px 0 0 10px;background:#fff;width: 120px;height: 120px;}
.a_photo img { width: 120px;height:90px;}
.a_photo li{ background: #E6E6E6 none repeat scroll 0% 0%;color: #333;text-align: center;width: 120px;height:30px;line-height: 30px;list-style:none; }

.next_photo {float:right;margin:-129px 10px 0 0;background:#fff;width: 120px;height: 120px;}
.next_photo a{float:right;}
.next_photo a img{width: 120px;height: 90px;}
.next_photo li{background: #E6E6E6 none repeat scroll 0% 0%;color: #333;text-align: center;width: 120px;height: 30px;line-height: 30px;list-style:none;}
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表