尝试按照
中的文档建议创建垂直导航栏https://react-bootstrap.github.io/components/navs/
const navInstance = (
<Nav bsStyle="pills" stacked activeKey={1} onSelect={handleSelect}>
<NavItem eventKey={1} href="/home">
NavItem 1 content
</NavItem>
<NavItem eventKey={2} title="Item">
NavItem 2 content
</NavItem>
<NavItem eventKey={3} disabled>
NavItem 3 content
</NavItem>
</Nav>
);
但看起来堆叠关键字什么也没做,导航显示为水平: The result I got
这就是它应该是这样的: Snapshot of docs 我做错了什么?
答案 0 :(得分:0)
您需要显式添加bootstrap css。 Bootstrap Guide for react
将以下链接添加到您的public / index.html
public class GeneratedNums {
public static void main(String[] args) {
int [] numbers = new int [101];
for ( int x=0; x < 101; x++){
numbers[x] = sumDigits (x);
}
for ( int x=0; x < numbers.length; x++){
System.out.println(x + ": " + numbers[x]);
}
}
public static int sumDigits ( int num) {
int sum = num;
while ( num != 0){
num += num%10;
num /= 10;
}
return num;
}
}