首页 > 解决方案 > 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%; 
}

标签: csstwitter-bootstrap

解决方案


(1st):bootstrap 4 正在覆盖您的 bootstrap 3 代码。(2):在你的css代码中没有使用边框或阴影属性,所以如果没有边框,如何显示线条。


推荐阅读