Bootstrap .btn 在 Safari 上看起来不同

Sai*_*son 3 html css bootstrap-4

我有这个 HTML 代码:

<div class="modal-footer">
  <button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
  <a href="poweron.php" type="button" class="btn btn-danger text-white">Power On</a>
</div>
Run Code Online (Sandbox Code Playgroud)

这是它在 Safari 和 Chrome 上的样子:

在此输入图像描述

为什么电源按钮看起来“灰色”,并且在 Safari 上大小不同,但在 Chrome 上却按我的预期工作?如何让它看起来和谷歌浏览器上的一模一样?

ren*_*rin 7

您可以尝试使用以下代码将此样式添加到您的<a>标签中:

a[type='button'] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
Run Code Online (Sandbox Code Playgroud)