首页 > 解决方案 > bootstrap4 中不显示边框?请检查下面给出的代码

问题描述

这是我的一段代码class="card border-primary-left shadow h-100 py-2"当我尝试运行此代码时,边框不显示。

<div class="container-fluid mt-2"> <div class="col-xl-3 col-md-6 mb-4"> <div class="card border-primary-left shadow h-100 py-2"> <div class="card-body"> <div class="row no-gutters align-items-center"> <div class="col mr-2"> <div class="text-xs font-weight-bold text-primary text-uppercase mb-1">Earnings (Monthly)</div> <div class="h5 mb-0 font-weight-bold text-gray-800">$40,000</div> </div> </div> </div> </div> </div> </div> 

标签: htmlwebtwitter-bootstrap-3bootstrap-4

解决方案


Bootstrap中没有border-primary-left类。请参阅文档:https ://getbootstrap.com/docs/4.4/utilities/borders/

由于.card已经有边界,它将是:

card border-primary border-bottom-0 border-right-0 border-top-0 

推荐阅读