曾经对于react项目怎么使用bootstrap纠结了好久,网上也查了好多的资料,有的用react-bootstrap,只要npm install 之后,import就能够使用里面的css了。可是这个样式跟我想要的bootstrap仍是有点不同的。我但愿用http://www.bootcss.com/里的,最近才发现,本身真的有的时候瞎想太多了,就跟以前同样,把bootstrap的css以及js引用直接放在index.html里面引用就能够了,真是为之前的愚蠢汗颜!!!css
附引用代码:html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="theme-color" content="#000000"> <link rel="manifest" href="%PUBLIC_URL%/manifest.json"> <link rel="stylesheet" href="./css/bootstrap.min.css" rel="stylesheet"> <title>React App</title> </head> <body> <div id="root"> </div> <script src="js/jquery-3.2.1.slim.js"></script> <script src="js/popper.min.js"></script> <script src="js/bootstrap.min.js"></script> </body> </html>