有没有办法更改Bootstrap React卡组件的边框大小?
通过Bootstrap React的读取文档> documentation ,我发现API包括边框颜色。 ..这几乎是边境的。有谁知道您是否也可以自定义边界的大小(宽度)?我还尝试编写一些自定义CSS来覆盖边框,将bootstrap-card
className属性添加到< card>
组件中,但是我尝试的内容不起作用:
//index.scss
.Bootstrap-Card {
border-width: 10px;
border-color: red;
}
//index.js
<Card className="Bootstrap-Card" style={{ width: '50rem' }}> ...
任何见解都将不胜感激,谢谢!
Reading through bootstrap react's documentation, I found that the API includes border color... and that was pretty much it for border. Does anyone know if you can customize the size (width) of the border as well? I also tried to write some custom css to overwrite the border, adding the Bootstrap-Card
className attribute to the <Card>
component, but what I tried did not work:
//index.scss
.Bootstrap-Card {
border-width: 10px;
border-color: red;
}
//index.js
<Card className="Bootstrap-Card" style={{ width: '50rem' }}> ...
Any insight would be greatly appreciated, thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
类似的导入CS:
从“ ./app.module.css”;
的导入样式
使用以下语法使用您的课程:
您也可以这样导入:
导入“ ./app2.css”;
然后在className中直接使用字符串:
https://codesandbox.io/s/jolly-danny/jolly-danny -56cow6
Import css like this:
import styles from "./App.module.css";
Use your class with following syntax:
You can also import like this:
import "./App2.css";
and then use a string directly in className:
https://codesandbox.io/s/jolly-danny-56cow6