如何将鼠标指针光标应用于 FontAwesome 图标。

huangapple go评论68阅读模式
英文:

AwesomeFont - How to apply a mouse pointer cursor to a fa-icon

问题

如何在 fa-icon 上应用鼠标指针/悬停?

我有以下的 Excel 图标 - 在悬停在图标上时,如何应用鼠标指针?

我尝试了以下方法。但不起作用。

<fa-icon aria-hidden="true" class="ng-fa-icon file excel **fa-hand-pointer**" ng-reflect-ng-class="file-excel' ng-reflect-icon-prop="far, file excel">
 <svg  aria-hidden data-icon="file-excel....
英文:

How do you apply a mouse pointer / hover on a fa-icon?

I have the following Excel Icon - how can apply a mouse pointer when hovering over the icon?

I have tried the following. But does not work.

<fa-icon aria-hidden="true" class="ng-fa-icon file excel **fa-hand-pointer**" ng-reflect-ng-class="file-excel' ng-reflect-icon-prop="far, file excel">
 <svg  aria-hidden data-icon="file-excel....

答案1

得分: 2

.fa-hand-pointer {
  /* 为图标设置所需的样式 */
  cursor: pointer; /* 将鼠标指针设置为手形图标 */
}

.fa-hand-pointer:hover {
  /* 为悬停效果设置所需的样式 */
  color: #f00; /* 设置颜色为红色 */
}
英文:
.fa-hand-pointer {
  /* Set the desired styles for the icon */
  cursor: pointer; /* Set the mouse pointer to a hand icon */
}

.fa-hand-pointer:hover {
  /* Set the desired styles for the hover effect */
  color: #f00;
}

huangapple
  • 本文由 发表于 2023年6月15日 23:46:53
  • 转载请务必保留本文链接:https://go.coder-hub.com/76483399.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定