【发布时间】:2020-01-23 19:57:28
【问题描述】:
我试图让 svg 与它所在的 div 的末尾对齐。div 显示在 flex 中,我将“align-self:flex-end”附加到 svg 所在的 a 标签。我也试过块,浮动的权利。还有其他一些事情。任何帮助将不胜感激。
<div class="d-flex">
<a class="text-success" href="#"><h4 class="font-weight-bold mr-5">CRM Partners</h4></a>
<a href="#" class="text-success svg-end"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512" class="angle-right text-success" style="min-width: 13px;"><path d="M187.8 264.5L41 412.5c-4.7 4.7-12.3 4.7-17 0L4.2 392.7c-4.7-4.7-4.7-12.3 0-17L122.7 256 4.2 136.3c-4.7-4.7-4.7-12.3 0-17L24 99.5c4.7-4.7 12.3-4.7 17 0l146.8 148c4.7 4.7 4.7 12.3 0 17z"/></svg></a>
</div>
.svg-end {
align-self: flex-end;
}
【问题讨论】:
标签: html css bootstrap-4 frontend