我想在我的ReactJs-Spring项目中包含react-bootstrap主题。
我根据其网站上的教程链接了资源,如下所示:
<script src="https://unpkg.com/react@latest/dist/react.js"></script>
<script src="https://unpkg.com/react-dom@latest/dist/react-dom.js"></script>
<script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-bootstrap/0.31.0/react-bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
我像这样对表元素进行编码:
<table className="table table-striped">
<tr>
<th>Name</th>
<th>Age</th>
<th>Years</th>
<th>Delete</th>
</tr>
</table>
任何人都可以帮我解决这个问题吗?感谢
答案 0 :(得分:0)
尝试添加thead
和tbody
元素,例如:
<table className="table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Age</th>
<th>Years</th>
<th>Delete</th>
</tr>
</thead>
<tbody>
...
</tbody>
</table>