GetUIKit 不显示按钮周围的矩形

GetUIKit does not show a rectangle around the button

根据 HTML GetUiKit 文档,此 html 代码应创建 3 个漂亮的按钮,文本周围有一个矩形。但是这段代码只显示了按钮的文本,没有矩形。 https://getuikit.com/v2/docs/button.html

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/uikit/3.1.7/css/uikit.min.css" />
    <script src="https://cdnjs.cloudflare.com/ajax/libs/uikit/3.1.7/js/uikit.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/uikit/3.1.7/js/uikit-icons.min.js"></script>
  </head>
  <body>
    <a class="uk-button" href="">Link</a>
    <button class="uk-button" type="button">Button</button>
    <button class="uk-button" type="button" disabled>Disabled</button>
  </body>
</html>

如何解决这个问题?

您指的是旧文档,自 v2 以来有很多更改。查看当前的 UIKit v3(因为您在代码段中使用了 v3,并且您也在上一个问题中使用了它)

https://getuikit.com/docs/button

下面你可以看到正确使用类。

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/uikit/3.1.7/css/uikit.min.css" />
    <script src="https://cdnjs.cloudflare.com/ajax/libs/uikit/3.1.7/js/uikit.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/uikit/3.1.7/js/uikit-icons.min.js"></script>
  </head>
  <body>
    <a class="uk-button uk-button-default" href="">Link</a>
    <button class="uk-button uk-button-primary" type="button">Button</button>
    <button class="uk-button uk-button-default" type="button" disabled>Disabled</button>
  </body>
</html>