在wordpress主题中的header.php中,有一个wp_head()函数,外貌上看不出什么玄机,只能在浏览器中检察源代码才能看出它所生成的如下代码:
复制代码代码如下:
<style type=”text/css” media=”print”>#wpadminbar { display:none; }</style>
<style type=”text/css”>
html { margin-top: 28px !important; }
* html body { margin-top: 28px !important; }
</style>
如许使页面顶部总空缺28px ,虽然我已经在全局的css文件中设置*{margin:0px; padding:0px;}了,但还是无法办理!当然删除wp_head()后就好了,但是这个函数是体系函数,最好不要删。
末了在一个外国论坛找到办理方法:在主题中的footer.php中的</body>前加上<?php wp_footer();?>。 |