網格系統不起作用,也許我很笨,但我不明白,我的代碼:
import React from "react";
import {Col, Row} from "react-bootstrap";
const Home = () => {
return (
<Row className="home">
<Col xs={6}>2 of 3 (wider)</Col>
<Col xs={6}>3 of 3</Col>
</Row>
)
}
export default Home;
uj5u.com熱心網友回復:
嘗試在 public 檔案夾bootstrap CDN link 的index.html中添加。
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
參考https://getbootstrap.com/docs/3.3/getting-started/
uj5u.com熱心網友回復:
你應該在你的專案中匯入 bootstrap css
import 'bootstrap/dist/css/bootstrap.min.css'
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/403129.html
標籤:
下一篇:從多個API端點獲取資料
