emlog文章页实现上一篇和下一篇的文章翻篇代码,非常的简单,只需要把下面的代码复制粘贴到模板echo_log.php最后位置即可。
效果图:
代码:
<style> #prevlog{width:40px;height:80px;background:url(http://img.itc.cn/photo/olZ77IqbZHL) no-repeat; position:fixed;left:35%;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:57%;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']).'" rel="external nofollow" title="'.$prevLog['title'].'"></a></div>';} else{ echo '<div id="prevlog"><a href="#" rel="external nofollow" rel="external nofollow" title="没有上一篇了"></a></div>';}; if($nextLog){ echo '<div id="nextlog"><a href="'.Url::log($nextLog['gid']).'" rel="external nofollow" title="'.$nextLog['title'].'"></a></div>';} else{ echo '<div id="nextlog"><a href="#" rel="external nofollow" rel="external nofollow" title="没有下一篇了"></a></div>';};?>
您可以选择以下一种方式打赏本站
支付宝扫一扫打赏