[英]Cannot see the content inside the 'Tab' component in react-bootstrap
我正在使用react-bootstrap
框架的Tabs
组件。 当我举一个例子:
<div>
<p> AAAAAAA </p>
</div>
在Tab
我在此标签中看不到任何内容。
<Tabs defaultActiveKey="profile" id="uncontrolled-tab-example">
<Tab eventKey="home" title="Home">
<div>
<p>sssssssssssssssssss</p>
</div>
</Tab>
<Tab eventKey="profile" title="Profile">
<div>
<img src="https://cdn.pixabay.com/photo/2019/08/03/12/22/hot-air-balloons-4381674__340.jpg" alt="picture"/>
</div>
</Tab>
<Tab eventKey="contact" title="Contact" disabled>
</Tab>
</Tabs>
演示在这里: https : //stackblitz.com/edit/react-ufa6nq?file=index.js
您已在项目中添加了三个引导CSS。 在index.html
文件中添加了两个CSS链接,在index.js
文件中添加了一个CSS链接。
删除import 'bootstrap/dist/css/bootstrap.css';
从index.js
文件中删除一行,并从index.html
文件中删除bootstrap.min.css
链接之一。
在这里,我已经为您更新了工作代码。
https://stackblitz.com/edit/react-bootstrap-tabs-3gt7r7
希望这对您有用!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.