哟可以做这样的事情,并发挥与positioning
和flex
:
.the-wrapper {
position: relative;
}
.the-wrapper .icon {
position: absolute;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
</style>
<span class="fa-stack fa-2x the-wrapper">
<FontAwesomeIcon icon={faCircle} />
<div class="icon">
<FontAwesomeIcon icon={faFlag} />
</div>
</span>