gpt4 book ai didi

html - anchor 链接登陆错误位置

转载 作者:技术小花猫 更新时间:2023-10-29 12:47:31 24 4
gpt4 key购买 nike

可能是个愚蠢的问题,但老实说,我无法理解这里出了什么问题。

http://harrisonfjord.com/thinkinc/

我目前正在 build 的网站。我想在 http://harrisonfjord.com/thinkinc/index.php#sponsors 建立一个 anchor 链接.我已将 anchor 设置为在以下代码之前发生:

<a name="sponsors"></a>
<div class="sponsors">
<div class="sponsors-left">
<h2>Sponsors</h2>
<p>Support the lovely folks who support us! Visit their websites, join their mailing lists and peruse their wares. They are all highly-deserving of your custom, and we're thrilled to have each and everyone one of them on-board!</p>
</div>

但是,当您单击 anchor 链接时,它会停在 div 的一半位置。我认为这可能是 anchor 链接加载后图像加载的问题,所以我手动输入所有标签的宽度/高度。我也对标题栏中的 cufon 文本替换做了同样的操作。

这些都没有帮助,所以现在我求助于您。无论出于何种原因, anchor 在 Firefox 中也不起作用。对我在这里做错了什么有什么想法吗?

干杯!

最佳答案

我认为问题是由您使用的没有内容的 anchor 引起的。

另外,name= 似乎是 deprecated in favor id= 作为某些元素(包括 A)中的片段标识符,这在某种程度上是有意义的,因为 ID 属性是唯一的,而 NAME 属性则不能保证。

我会尝试将片段标识符粘贴在实际的可渲染实体中,例如:

<h2 id="sponsors">Sponsors</h2>

看看它能给你带来什么。顺便说一句,这看起来是个不错的 session ,我希望你能得到补偿。

关于html - anchor 链接登陆错误位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6826741/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com