我的反应靴带传送带未渲染。下面是我添加的代码,这是输出。
import React from "react";
import RBCarousel from "react-bootstrap-carousel";
export default class StampCards extends React.PureComponent {
constructor(props) {
super(props);
}
render() {
return (
<div className="slider-container">
<RBCarousel animation={true} autoplay={false} slideshowSpeed=
{2000} version={4} onSelect={this.onSelect} ref={r =>
(this.slider = r)}>
<div>Page1</div>
<div>Page2</div>
</RBCarousel>
</div>
);}}
但是我想要的是这样的东西 https://skycloud1030.github.io/react-bootstrap-carousel/example/demoV3.html 代码在这里: https://github.com/skycloud1030/react-bootstrap-carousel/blob/gh-pages/app/demoV3.jsx
问题是我忘了导入引导css
答案 0 :(得分:2)
尝试导入
import ReactDOM from "react-dom";
import "react-bootstrap-carousel/dist/react-bootstrap-carousel.css";