更改字体图标的样式
Changing styles of Font icons
我想改变宽度、高度并旋转正方形。我尝试使用内联样式提供样式,但它不起作用。我的代码如下:
component.ts:
import { faSquare } from '@fortawesome/free-solid-svg-icons';
faSquare =faSquare;
html:
<fa-icon [icon]="faSquare"</fa-icon>
您可以在图标内部提供内联样式,如下所示:
<fa-icon [icon]="faSquare" [styles]="{height: '40px', width: '40px', transform: 'rotate(25deg)'}"></fa-icon>
component.ts:
import { faSquare } from '@fortawesome/free-solid-svg-icons';
faSquare =faSquare;
html:
<fa-icon [icon]="faSquare"</fa-icon>
component.ts:
import { faSquare } from '@fortawesome/free-solid-svg-icons';
faSquare =faSquare;
html:
<fa-icon [icon]="faSquare" [styles]="
#change width, height
{height: '64px', width: '64px',
#rotate square
transform: 'rotate(30deg)'}">
</fa-icon>
我想改变宽度、高度并旋转正方形。我尝试使用内联样式提供样式,但它不起作用。我的代码如下:
component.ts:
import { faSquare } from '@fortawesome/free-solid-svg-icons';
faSquare =faSquare;
html:
<fa-icon [icon]="faSquare"</fa-icon>
您可以在图标内部提供内联样式,如下所示:
<fa-icon [icon]="faSquare" [styles]="{height: '40px', width: '40px', transform: 'rotate(25deg)'}"></fa-icon>
component.ts:
import { faSquare } from '@fortawesome/free-solid-svg-icons';
faSquare =faSquare;
html:
<fa-icon [icon]="faSquare"</fa-icon>
component.ts:
import { faSquare } from '@fortawesome/free-solid-svg-icons';
faSquare =faSquare;
html:
<fa-icon [icon]="faSquare" [styles]="
#change width, height
{height: '64px', width: '64px',
#rotate square
transform: 'rotate(30deg)'}">
</fa-icon>