css - CSS 和 Bootstrap - 我已经用示例中的 bootstrap 3 完成了方形线 css,但与 bootstrap 4 线相同的 css 消失了吗?
问题描述
我有 CSS 代码用 bootstrap 3 绘制方线,感谢 Kris Urbas 提供漂亮的方线代码。然后我使用与 bootstrap 4 相同的代码,方线已经消失。
如何调整 css 代码以使用 bootstrap 4?
下面是CSS代码:
.product {
margin: 0;
overflow: auto;
}
.product__price {
display: inline-block;
line-height: 34px;
}
.product__button-wrap {
float: right;
}
.product-list {
padding: 0;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: stretch;
}
.product-list__item {
list-style: none;
width: 32%;
}
感谢所有的回复和回答。我更新了我的 CSS 代码。它非常漂亮,非常棒!!!以下是我的更新 css 代码:
.image-list__item {
border: 1px solid lightgrey;
border-radius: 5px;
display: flex;
padding: 20px;
list-style: none;
width: 30%;
}
解决方案
(1st):bootstrap 4 正在覆盖您的 bootstrap 3 代码。(2):在你的css代码中没有使用边框或阴影属性,所以如果没有边框,如何显示线条。
推荐阅读
- flutter - 使用 Navigator 2.0 API 在嵌套导航中的 BottomNavigationBar 选项卡之间切换时保持滚动位置
- haskell - (序列 。) 。翻转 fmap === forM?
- c++ - 为什么不删除当前节点并将前一个节点指向下一个节点?
- ffmpeg - 如何通过冻结最后一帧而不重新编码整个流来扩展视频?
- common-lisp - 在 Lisp 中修改结构字段/槽的副本
- django - Django REST:如何将 SimpleJWT 访问和刷新令牌作为带有自定义声明的 HttpOnly cookie 返回?
- c++ - 为什么负 size_t 下溢但减去它却没有?
- google-chrome-extension - 由于内容安全策略,Chrome 扩展程序拒绝加载脚本(试图在 chrome 扩展程序中运行 babel)
- flex-lexer - 为 (f)lexers 定义 lex 包含文件
- reactjs - ReactJs 管理一组有状态组件