Coloring

优质
小牛编辑
126浏览
2023-12-01

描述 (Description)

按钮可以着色以赋予它们额外的含义。 可以使用.disabled类禁用按钮,该类将按钮显示为淡入淡出,并且不会禁用该控件。 如果要禁用“按钮”元素,请为其添加disabled属性。 如果要禁用链接,请添加aria-disabled属性。

例子 (Example)

以下示例演示如何为Foundation中color the buttons

<html>
   <head>
      <title>Button Coloring</title>
      <link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/css/foundation.css">
   </head>
   <body>
      <a class = "secondary button" href = "#">Secondary</a>
      <button type = "button" class = "success button">Success</button>
      <button type = "button" class = "alert button">Alert</button>
      <a class = "warning button" href = "#">Warning</a>
      <a class = "disabled button" href = "#">Disabled</a>
      <button type = "button" class = "disabled button">Disabled</button>
      <script src = "https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/js/vendor/jquery.min.js"></script>
      <script src = "https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/js/foundation.min.js"></script>
      <script>
         $(document).ready(function() {
            $(document).foundation();
         })
      </script>
   </body>
</html>