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>';};?>
本文转载自:蓝叶博客的文章 转载网址:http://lanyes.org/zuopin/623.html
推荐阅读
- 上一篇: emlog手机访问自动跳转插件【更新2.0】
- 下一篇: 2017高考招生制度改革方案公布-不分文理科
文章标签: 上下篇按钮代码
版权声明:
本站所有主题由该文章作者发表,该文章作者与長大樂忧伤享有文章相关版权。
本帖可能有部分转自其它媒体,并不代表本站赞同其观点和对其真实性负责,如有侵犯,请告知,将及时予与删除并致歉。
本文链接: http://www.ibolg.net/emlog/140.html,尊重共享,欢迎转载!
分享本文:
呃 本文暂时没人评论 来添加一个吧
发表评论