【发布时间】:2015-12-04 13:58:21
【问题描述】:
我正在尝试使用 react-bootstrap 并更改 NavItem 内部 <a> 元素的类。我尝试使用className,但它并没有影响它。
我想更改hover 操作的颜色。我该怎么做?
<Navbar.Collapse>
<Nav pullRight>
<NavItem eventKey={1} href="#">1</NavItem>
<NavItem eventKey={2} href="#">2</NavItem>
<NavItem eventKey={3} href="#" className="my-class">3</NavItem>
</Nav>
</Navbar.Collapse>
css:
.xnavbar-tab a {
color: #F89800;
}
【问题讨论】:
-
请添加更多代码和行为。您如何在悬停时添加/删除类?
-
我在 css 文件中添加了
:hover动作,但即使只是更改颜色也无济于事
标签: twitter-bootstrap reactjs react-bootstrap