Bootstrap 5 按钮中的文本和 FontAwesome 对齐
我正在尝试弄清楚如何使用 Bootstrap 5 按钮执行某些操作。我希望能够将按钮的文本标签左对齐,将 FontAwesome 图标右对齐。如果我使用固定宽度按钮,如何确保它根据屏幕尺寸以及所有其他内容进行缩放? 现在这是我的按钮,但图标位于错误的一侧,没有任何理由:
<button type="button" class="btn btn-labeled btn-success">
<span class="btn-label"><i class="fa fa-angle-right"></i></span>
Learn More
</button>
提前感谢大家的帮助!
I am trying to figure out how to do something with a Bootstrap 5 button. I would like to be able to have the text label of the button left-justified and the FontAwesome icon right-justified. If I use a fixed-width button, how do I make sure it scales according to screen size along with all of the other content?
Here's my button now, but the icon is on the wrong side, and nothing is justified:
<button type="button" class="btn btn-labeled btn-success">
<span class="btn-label"><i class="fa fa-angle-right"></i></span>
Learn More
</button>
Thank you in advance for your help, everyone!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
干得好...
Here you go...