[英]How to change the direction of a font awesome icon?
I am using the font-awsome library to show a unlock icon . 我正在使用font-awsome库来显示解锁图标。
So, By default the direction is in right direction, I want to change that to the left. 因此,默认情况下,方向是正确的方向,我想将其更改为左侧。
<i class="fas fa-unlock-alt"></i>
SO, is there any way through which I can change the direction of the unlock icon ? 那么,有什么方法可以改变解锁图标的方向吗?
You can rotate and flip icons with font awesome. 您可以旋转和翻转图标与字体真棒。 In your case you can try this:
在你的情况下你可以试试这个:
<i class="fas fa-unlock-alt fa-flip-horizontal"></i>
Check out this link for more information https://fontawesome.com/how-to-use/on-the-web/styling/rotating-icons 有关更多信息, 请查看此链接https://fontawesome.com/how-to-use/on-the-web/styling/rotating-icons
Considering the JS+SVG version you can use flip-h
to flip the icon horizontally 考虑到JS + SVG版本,您可以使用
flip-h
水平翻转图标
<script defer src="https://use.fontawesome.com/releases/v5.8.1/js/all.js"></script> <i class="fas fa-unlock-alt" data-fa-transform="flip-h"></i>
More details: https://fontawesome.com/how-to-use/on-the-web/styling/power-transforms 更多细节: https : //fontawesome.com/how-to-use/on-the-web/styling/power-transforms
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.