首页 > 解决方案 > 如何从 Bootstrap 按钮中删除悬停效果?

问题描述

我有一个 Bootstrap 按钮,在其中我覆盖了样式表中的样式,因为我想让按钮变暗,现在按钮上有 Bootstrap 的悬停效果,我该如何摆脱它?有关结果,请参见下面的代码段:

.btn-dark {
  min-width: 100px;
  background-color: black;
  color: white;
  border-radius: 1px;
  text-decoration: none;	
  opacity:1.0;
  box-shadow:none;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<a href="#" class="btn btn-dark space hvr-pulse tog1" data-toggle="modal" data-target="#exampleModalCenter"><i class="fab fa-telegram-plane"></i> SEND US A MESSAGE</a>

标签: htmlcsstwitter-bootstrap-3

解决方案


尝试使用 :hover 选择器并添加更多 CSS 来指定设计的确切过渡。

.btn-dark:hover {
  color: white;
}

推荐阅读