我在页面上有 anchor 链接,可以将您跳转到页面的各个部分。例如:
<a href="#pointandshoot">Point and Shoot Cameras</a>
然后在页面下方:
<a name="pointandshoot"></a>
页面上有几个不同的。
这些在 Mac 和 PC 上的 Chrome 和 Safari 中运行良好,但在 Mac 和 PC 上的 Firefox 或 PC 上的 IE (8) 中根本不起作用。他们在页面上跳了一小段距离,但没有跳到他们应该去的地方。
任何帮助,将不胜感激。
最佳答案
在我今天遇到的一个问题之后,看起来没有内容的 anchor 标记在某些版本的 IE 中不起作用,例如:<a id="example"></a>
在里面放一些东西可以解决问题,例如:<a id="example"> </a>
无论您使用 name
还是 id
作为 anchor ,行为都相同。
我还没有用 Firefox 测试过。
关于internet-explorer - 页面上的 anchor 链接在 Firefox 或 IE 中不起作用,但在 Chrome 和 Safari 中起作用,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/16492909/