react項目使用bootstrap

曾經對於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>
相關文章
相關標籤/搜索