滚动后反应引导程序导航栏样式

时间:2019-06-16 19:22:19

标签: reactjs react-bootstrap

滚动后,我想向我的透明导航栏添加其他CSS类。谁能帮我?我正在使用Reactjs开发Gatsby。

const Header = ({ siteTitle }) => (
   <Navbar id="nav" fixed="top" expand="lg">
     <Navbar.Brand to="#home">
       <Link to="/"><img src={logo} width="35" /></Link>
        </Navbar.Brand>
        <Navbar.Toggle aria-controls="responsive-navbar-nav" />
        <Navbar.Collapse id="responsive-navbar-nav">
          <Nav className="ml-auto">
            <Link to="#">Home</Link>
            <Link to="#">Services</Link>
            <Link to="#">Contact</Link>
            <Link to="#">FAQ</Link>
          </Nav>
          <Nav>
            <Link to="#" className="sign-up">
              Sign up
            </Link>
            <Link eventKey={2} to="#" className={styles.login}>
              Log in <span className="icon-arrow-right"></span>
            </Link>
          </Nav>
        </Navbar.Collapse>
      </Navbar>
    )

0 个答案:

没有答案