gpt4 book ai didi

node.js - react-bootstrap 不包含 css

转载 作者:搜寻专家 更新时间:2023-10-31 23:00:38 24 4
gpt4 key购买 nike

我的 jsx 文件成功识别了 react-bootstrap 元素,但它们没有样式。我项目的 node-modules 文件夹包含 react-bootstrap 和 bootstrap。为什么会这样?

var React = require('react');
var Button = require('react-bootstrap').Button;
var Jumbotron = require('react-bootstrap').Jumbotron;

var ReactComponentHi = React.createClass({displayName: 'Hi',

render: function() {
return (
<div>
<Button bsStyle='success'>
clickk
</Button>
<Jumbotron>
<h1>Hello, world!</h1>
<p>This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p>
<p><Button bsStyle='primary'>Learn more</Button></p>
</Jumbotron>
</div>

);
}
});

module.exports = ReactComponentHi;

what the results look like

最佳答案

我将以下行添加到我的 index.html 并且它起作用了。

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">

关于node.js - react-bootstrap 不包含 css,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32229910/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com