I'd like to put a Font Awesome font to the upper image section of bootstrap card component, card-img-top
.
Following similar with the official guide and some solution, it didn't work:
// card-img.css
<script>
FontAwesomeConfig = { searchPseudoElements: true };
</script>
.card-top-img {
display: none;
}
.card-head::after {
font-family: "Font Awesome 5 Solid";
content: "\f15c";
}
<!-- list.html (I'm do in Django project) -->
<div class="row">
{% for resume in resume_list %}
<div class="col-md-4">
<div class="card mb-4 box-shadow">
<!-- add for pseudo element -->
<div class="card-head">
<img class="card-img-top" src="" alt="">
</div>
<div class="card-body text-center">
<h5 class="card-title text-success">
</div>
...
But it just render small empty box:
How can I work this?