ZBlogPHP主题模板制作教程_尾部文件footer.php

本文我们来完善一下整个框架,前面的框架基本完成,下面是尾部文件footer.php。我们要修改index.php文件和single.php,再添加调用footer.php文件代码。


——首先,新建一个footer.php文件,写入以下代码。

ZBlogPHP主题模板制作教程_尾部文件footer.php ZBlog主题模板制作 第1张

PHP
{* Template Name:公共底部 *}
<div class="Blogfooter">
<div class="CopyRight-center">
Copyright &copy <a href="{$host}">{$name}</a>&nbsp; 版权所有<br/>{$copyright}
</div>
</div>
<div class="top"></div>
</div>
</body>
</html>

——这是尾部文件footer.php文件使用的CSS样式。

CSS
.Blogfooter {text-align:center;margin-right:320px;margin-left:210px;display:block;padding-bottom:20px;}.top {height:40px;width:40px;border:1px solid #ddd;position:fixed;right:20px;bottom:40px;background-image:url(images/top.png);background-repeat:no-repeat;cursor:pointer;border-radius:5px;}

——删除index.php文件中的{</div></body></html>},然后写入以下调用代码。

ZBlogPHP主题模板制作教程_尾部文件footer.php ZBlog主题模板制作 第2张

PHP
{template:footer}

——同理删除single.php文件中的{</div></body></html>},写入以下调用代码。

ZBlogPHP主题模板制作教程_尾部文件footer.php ZBlog主题模板制作 第3张

PHP
{template:footer}


转载请说明出处内容投诉
zblog资源网 » ZBlogPHP主题模板制作教程_尾部文件footer.php

发表评论

欢迎 访客 发表评论

加入会员,享受更优质的zblog技术服务!

马上加入 会员说明 联系客服