【问题标题】:HTML different button styles - like a gearHTML 不同的按钮样式 - 就像一个齿轮
【发布时间】:2019-04-17 06:55:47
【问题描述】:

我有一个名为“设置”的按钮,我希望这个按钮看起来像一个齿轮。 我发现了这个:https://www.toptal.com/designers/htmlarrows/symbols/gear/ 还有这个:https://www.w3schools.com/icons/tryit.asp?filename=tryicons_fa-gear

但它们不适用于我的角度/电子项目。

这是当前按钮(普通按钮):

<button class="flex-buttons"  class="form-control settings">Settings</button>

非常感谢!

【问题讨论】:

    标签: html angular electron


    【解决方案1】:

    您需要在index.html 中加载&lt;link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"&gt; 才能使用像第二个示例中的'fa fa-gear' 这样的字体很棒的类。

    【讨论】:

      【解决方案2】:

      Google 自己提供图标列表,尝试使用它。

      <!DOCTYPE html>
      <html>
      <head>
      <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
      </head>
      <body>
      
      <i class="material-icons">settings</i>
      <i class="material-icons" style="font-size:24px;">settings</i>
      <i class="material-icons" style="font-size:40px;color:red;">settings</i>
      <i class="material-icons" style="font-size:60px;color:green;">settings</i>
      
      </body>
      </html>
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2019-09-28
        • 1970-01-01
        • 2013-11-03
        • 1970-01-01
        • 2016-12-02
        • 1970-01-01
        • 2021-08-01
        相关资源
        最近更新 更多