我是 WordPress 新手,正在为 friend 编辑网站。我正在尝试向站点添加 RSS 提要,因此我编辑了 header.php 文件(这就是它的去向)。
我还编辑了 CSS,然后使用 FileZilla 上传了它。我刷新了页面,它看起来没有什么不同。
这是 HTML:(LinkedIn 以前在那里,它工作正常)
<a href="http://www.linkedin.com/in/millermusicllc" target="_blank">
<div id="linked_in"></div>
</a>
<a href="http://www.millermusiclessons.com/home-page/feed/" target="_blank">
<div id="rss"></div>
</a>
这是 CSS:(Twitter 之前就在那里,而且工作正常)
#twitter{background:url("images/u_tube.png") no-repeat scroll 0 0 transparent;float:right;height:35px;width:35px;margin:21px 10px 0 0;}
#rss{background:url("images/feed.gif") no-repeat scroll 0 0 transparent;float:right;height:35px;width:35px;margin:21px 10px 0 0;}
当我转到该页面并查看源代码时,我的 HTML 不在那里。我不知道为什么。有什么建议吗?
网址是http://www.millermusiclessons.com/
谢谢
最佳答案
#twitter ID 好像没有实现?我建议通过以下方式将图像直接放入代码中
<a href="http://www.linkedin.com/in/millermusicllc" target="_blank">
<div id="linked_in"><img src="images/u_tube.png" /></div>
</a>
<a href="http://www.millermusiclessons.com/home-page/feed/" target="_blank">
<div id="rss"><div id="linked_in"><img src="images/feed.gif" /></div>
</a>
您还需要更改 css 样式以删除背景图像部分。 Wordpress 有一个内置的编辑器,我建议您使用。我保证该文件确实更新了并且它是正确的文件。还要确保图像位于正确的位置。例如,如果您的 css 文件位于名为 css 的文件夹中,例如 css/style.css,您的图像路径必须是相对的,因此该部分
#twitter{background:url("../images/u_tube.png") no-repeat scroll 0 0 transparent;float:right;height:35px;width:35px;margin:21px 10px 0 0;}
#rss{background:url("../images/feed.gif") no-repeat scroll 0 0 transparent;float:right;height:35px;width:35px;margin:21px 10px 0 0;}
需要在前面加一个 ../来表示父目录。如果您需要更好的解释,请告诉我。
关于html - WordPress 麻烦,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8070542/