在Safari浏览器上,Bootstrap按钮的外观有所不同。

3

我有这段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>

以下是在Safari和Chrome中的显示效果:

输入图像描述

为什么在Safari上电源按钮看起来是“灰色的”,大小也不同,但在Chrome上按照期望工作?如何让它在Safari中完全与Google Chrome相同?

1个回答

7
您可以尝试使用以下代码将此样式添加到您的<a>标记中:
 a[type='button'] {
   -webkit-appearance: none;
   -moz-appearance: none;
   appearance: none;

 }

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接