小编Fil*_*ppo的帖子

如何更改按钮悬停属性中的文本颜色

我使用本指南来自定义我使用bootstrap创建的网页中的按钮:

使用Bootstrap自定义更改按钮上的悬停颜色

问题是我无法在悬停中保持相同的字体颜色,我无法解释为什么它总是变为深灰色.这是代码:http://codepen.io/anon/pen/ByKZZK

HTML:

<head>
   <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
</head>

<button href="mailto:abc@def.ghi" class="btn btn-custom btn-lg btn-block">info@mail.org&nbsp; <span class="glyphicon glyphicon-envelope"></span></button>
Run Code Online (Sandbox Code Playgroud)

CSS:

.btn-custom {
    color: #FFD180;;
    background-color: #483737;
    border-color: #357ebd; /*set the color you want here*/
}
.btn-custom:hover, .btn-custom:focus, .btn-custom:active, .btn-custom.active, .open>.dropdown-toggle.btn-custom {
    color: #FFD180;
    background-color: #837171;
    border-color: #837171; /*set the color you want here*/
}
Run Code Online (Sandbox Code Playgroud)

有任何想法吗?

html css button hover twitter-bootstrap

5
推荐指数
2
解决办法
1万
查看次数

标签 统计

button ×1

css ×1

hover ×1

html ×1

twitter-bootstrap ×1