EMLOG文章页添加上一篇下一篇按钮代码
  • 内容
  • 相关

EMLOG文章页添加上一篇下一篇按钮代码

今天在浏览网页的时候,看到某个大型门户站的文章页添加了上一篇下一篇文章的按钮,我感觉这样很人性化,可以提升用户体验度,感觉不错就准备在自己的小站上也加个这功能,经过研究给我整出来这个功能了,你现在看到这个我文章页左右两边的按钮就是这个功能,点击就会查看相邻的文章;对于EMLOG的用户,如果你喜欢这个功能,可以按照下面的说明吧代码复制到你的网站里就可以了

说明:把以下代码复制粘贴到当前模板echo_log.php里面。
<style>
#prevlog{width:40px;height:80px;background:url(http://img.itc.cn/photo/olZ77IqbZHL) no-repeat; position:fixed;left:50%;top:380px;margin-left:-530px;filter:alpha(Opacity=60);-moz-opacity:0.6;opacity:0.6;z-index:9999;}
#prevlog a,#nextlog a{width:40px;height:80px;display:block;}
#prevlog:hover,#nextlog:hover{filter:alpha(Opacity=100);-moz-opacity:1;opacity:1;}
#nextlog{width:40px;height:80px;background:url(http://img.itc.cn/photo/olZ77phsS28) no-repeat; position:fixed;left:50%;top:380px;margin-left:490px;filter:alpha(Opacity=60);-moz-opacity:0.6;opacity:0.6;z-index:9999;}
*html #prevlog, *html #nextlog{position: absolute;top:expression(eval(document.documentElement.scrollTop));}
</style>
<?php extract($neighborLog);if($prevLog){
echo '<div id="prevlog"><a href="'.Url::log($prevLog['gid']).'" title="'.$prevLog['title'].'"></a></div>';}
else{
echo '<div id="prevlog"><a href="#" title="没有上一篇了"></a></div>';};
if($nextLog){
echo '<div id="nextlog"><a href="'.Url::log($nextLog['gid']).'" title="'.$nextLog['title'].'"></a></div>';}
else{
echo '<div id="nextlog"><a href="#" title="没有下一篇了"></a></div>';};?>

EMLOG文章页添加上一篇下一篇按钮代码-下载页面
评论后还是无法显示下载地址?清理缓存-点我试试
热度:2567° 评分:8.7 发布时间: 2017年6月5日

本文标签:

版权声明:若无特殊注明,本文皆为《小洋vier》原创,转载请保留文章出处。

本文链接:EMLOG文章页添加上一篇下一篇按钮代码

发表评论

电子邮件地址不会被公开。 必填项已用*标注