[英]How to use bootstrap in create-react-app?
I just used create-react-app and ive been trying to use bootstrap. 我只是使用create-react-app而我一直在尝试使用引导程序。 it doesnt work even after I npm install it.what should i do step by step This is my app do i need to write a "import" line
即使我安装了npm,它也无法正常工作。我应该怎么做呢? 这是我的应用程序吗,我需要写一个“导入”行
Yes, you do need to reference the files in your app. 是的,您确实需要引用应用程序中的文件。 You can add the necessary
<link .../>
and <script ...></script>
tags in your index.html file. 您可以在index.html文件中添加必要的
<link .../>
和<script ...></script>
标记。
You could also look into using something like the react-bootstrap
npm package instead. 您也可以考虑使用类似
react-bootstrap
npm软件包的方法。
Go to this link on your browser https://react-bootstrap.github.io/getting-started.html 在浏览器上转到此链接https://react-bootstrap.github.io/getting-started.html
Copy the bootstrap CDN link under the stylesheet section and add it to you index.html file in your your project. 复制样式表部分下的引导CDN链接,并将其添加到项目中的index.html文件中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.