更改动画响应式按钮的颜色

时间:2019-04-09 19:35:28

标签: html css twitter-bootstrap-3 bootstrap-modal

我无法更改CSS中响应式引导按钮的颜色。

我正在将Bootstrap 3与HTML一起使用。

<div class="col-md-12 text-center"> 
 <a data-animation="animated fadeInUp" class="header-requestbtn contactus-btn hvr-bounce-to-right" href="site/indexfdd4.html">PRODUCTS!</a></div> 
    <style>
        .header-requestbtn contactus-btn hvr-bounce-to-right {

         background-color: grey;
    }
    </style>

4 个答案:

答案 0 :(得分:1)

您的CSS错误。

.header-requestbtn.contactus-btn.hvr-bounce-to-right {
    background-color: grey;
}

答案 1 :(得分:0)

就做

<div class="col-md-12 text-center"> 
    <a data-animation="animated fadeInUp" class="header-requestbtn contactus-btn hvr-bounce-to-right" href="site/indexfdd4.html">PRODUCTS!</a>
</div> 

<style>
.contactus-btn {
      background-color: grey;
}

</style>

答案 2 :(得分:0)

假设您要在悬停时更改颜色,则需要在类的末尾添加:hover状态

.header-requestbtn.contactus-btn.hvr-bounce-to-right:hover { background: grey; }

答案 3 :(得分:-1)

我对您的班级名称间距有疑问

此处将得到更正的代码

<html>
    <style>
    .header-requestbtn_contactus-btn_hvr-bounce-to-right {
        background: grey;

}


</style>


  <div class="col-md-12 text-center"> 
    <a data-animation="animated fadeInUp" class="header-requestbtn_contactus-btn_hvr-bounce-to-right" href="site/indexfdd4.html">PRODUCTS!</a></div> 



</html>
相关问题