我的NavBar NavItem垂直显示,但我试图将其水平显示。我不知道我搞砸了哪里。如果您有任何想法,请告诉我。谢谢! 这是我的代码:
import React, { Component } from 'react';
import { Navbar, Nav, NavItem } from 'react-bootstrap';
import { Link } from 'react-router-dom';
import './CustomNavbar.css'
export default class CustomNavbar extends Component{
render(){
return(
<Navbar inverse collapseOnSelect>
<Navbar.Header>
<Navbar.Brand>
<Link to='/'>Tsarong </Link>
</Navbar.Brand>
<Navbar.Toggle />
</Navbar.Header>
<Navbar.Collapse>
<Nav>
<NavItem eventKey={1} href="/">
Home
</NavItem>
<NavItem eventKey={2} href="/main">
Main
</NavItem>
<NavItem eventKey={3} href="/contact">
Contact
</NavItem>
<NavItem eventKey={4} href="/about">
About
</NavItem>
<NavItem eventKey={5} componentClass={Link} to="/topics">
Topic
</NavItem>
</Nav>
</Navbar.Collapse>
</Navbar>
)
}
}
非常感谢您的时间!
答案 0 :(得分:2)
Executors.newSingleThreadScheduledExecutor()