[英]Duplicated Back-To-Top Button
One of my websites, www.makememodern.com , is displaying duplicate Back-To-Top buttons on all browsers when it should be showing one. 我的一个网站www.makememodern.com在应该显示一个的同时在所有浏览器上显示了重复的“返回页首”按钮。
footer.php footer.php
<div id="back-to-top"><a href="#">Back to Top</a></div>
CSS 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 shows: HTML显示:
<div id="back-to-top" style="display: block;"><a href="</p"></a><a href="#">Back to Top</a></div>
I achieve my desired results when I erase <a href="</p"></a>
from the HTML directly above, but I can't figure out how to change it permanently. 当我直接从HTML上方删除
<a href="</p"></a>
时,我达到了预期的结果,但是我不知道如何永久更改它。
Looks like you have a syntax error on line 790 in the view source. 看起来您在视图源中的第790行有语法错误。
<p>Copyright © 2014 Make Me Modern LLC, All rights reserved. <a href=</p>
Looks like there might be an extraneous link tag <a href=
If for whatever reason the <a href=
is intentional, then it needs to be completed. 看起来可能有一个多余的链接标记
<a href=
如果出于某种原因<a href=
是有意的,则需要完成它。 The main thing is, you're missing a closing tag on that line. 最主要的是,您在该行上缺少结束标记。
Your CSS is generating a different image for every a
tag. 你的CSS为每个产生不同的图像
a
标签。 I suggest you to put the background image inside the #back-to-top style 我建议您将背景图片放在#back-to-top样式内
#back-to-top {
position: fixed;
z-index: 1000;
bottom: 20px;
right: 20px;
display: none;
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 {
display: block;
}
#back-to-top:hover {
background-color: #222222;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.