“Skip Navigation” link not working in Google Chrom

2020-02-14 04:36发布

I follow this page to make a "Skip Navigation" link, however it is not working in Chrome (5.0.375.127).

When I tab and enter the link, it scroll to the content, but when I continue to tab, it starts from the top but not start from the content.

That page's skip "Skip Navigation" link is not working in Chrome either.

Is it a bug of Chrome? Any workaround?

7条回答
ゆ 、 Hurt°
2楼-- · 2020-02-14 05:23

Here's the same solution without jQuery.

Add page anchor:

<div class="skip-nav">
  <a href="#content">Skip to content</a>
</div>

Link to the content:

<section id="content" tabindex="-1">
  Lorem ipsum...
</section>

My jsfiddle

查看更多
登录 后发表回答