0

我已经将一个页面分成几部分,并放置了一个滚动按钮,可以从第一部分的第一部分滚动到第二部分,但它不起作用。

按钮:

<Link
            activeClass="active"
            to="panel_2"
            spy={false}
            smooth={true}
            offset={0}
            duration={500}
            class="text-manrope place-self-center bg-transparent text-white font-regular hover:text-orange py-4 px-12 sm:py-8 sm:px-20 border-2 border-white hover:border-orange rounded-full"
          >
            FIND OUT MORE
          </Link>

页面布局:

<>
      <section id="panel_1" class="scroll-margin bg-gray">
        <Panel1 />
      </section>
      <Element id="panel_2" name="panel_2" class="panel_2 double_section_rule">
        <Panel2 />
      </Element >
      <section id="panel_3" class="bg-gray">
        <Panel3 />
      </section>
      <section id="panel_4" class="double_section_rule">
        <Panel4 />
      </section>
      <section id="panel_5" class="double_section_rule bg-gray">
        <Panel5 />
      </section>
    </>

我不知道是否有任何问题,但 webapp 有多个页面(即:/about、/contact...)但我正在尝试在主页中实现滚动机制。

4

0 回答 0