我的一个网站,www.makememodern.com , 在所有浏览器上显示重复的返回顶部按钮,而它应该显示一个。
页脚.php
<div id="back-to-top"><a href="#">Back to Top</a></div>
CSS
#back-to-top {
position: fixed;
z-index: 1000;
bottom: 20px;
right: 20px;
display: none;
}
#back-to-top a {
display: block;
width: 40px;
height: 40px;
background: #E45323 url(http://makememodern.com/wp-content/uploads/2014/05/backtotop.png) no-repeat center center;
text-indent: -9999px;
-webkit-border-radius: 100px;
-moz-border-radius: 100px;
border-radius: 100px;
-webkit-transition: 0.2s all linear;
-moz-transition: 0.2s all linear;
-o-transition: 0.2s all linear;
transition: 0.2s all linear
}
#back-to-top a:hover {
background-color: #222222;
}
HTML 显示:
<div id="back-to-top" style="display: block;"><a href="</p"></a><a href="#">Back to Top</a></div>
当我删除 <a href="</p"></a>
时,我达到了我想要的结果来自上面的 HTML,但我无法弄清楚如何永久更改它。
最佳答案
看起来您在查看源代码的第 790 行有语法错误。
<p>Copyright © 2014 Make Me Modern LLC, All rights reserved. <a href=</p>
看起来可能有一个无关的链接标签 <a href=
如果出于某种原因 <a href=
是有意的,那么就需要完成。
最主要的是,您在该行中缺少结束标记。
关于php - 重复的返回顶部按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24206862/