html - 如何从 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>
解决方案
尝试使用 :hover 选择器并添加更多 CSS 来指定设计的确切过渡。
.btn-dark:hover {
color: white;
}
推荐阅读
- haskell - 了解 do 块中的守卫功能
- python - 为什么会发生此错误:“切片赋值仅支持变量”
- android - MediaPlayer.create() 返回 NULL
- javascript - 获取坐标数组中经纬度坐标的位置
- android - 如何仅为某些 ViewType 设置 ItemDecoration?
- javascript - 将 Curl 命令转换为 Axios
- powershell - 运行 ForEach 循环从 AD 用户提取数据
- javascript - 没有关于使用sails.js 制作CRUD 的描述
- javascript - 我们不能在 forEach 中重新分配数组值吗?
- macos - MacOS 上的 Chrome 引发“ERR_CERT_WEAK_SIGNATURE_ALGORITHM”警告