更改按钮内的文字:悬停

时间:2018-02-08 19:34:47

标签: html css onhover

如何更改" Contacte-nos"文字颜色:悬停?



.popmake-contacte-nos {

  background-color: #fffff7;
  /* Green */
  border: none;
  color: black;
  font-weight: bold;
  padding: 15px 32px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  cursor: pointer;
}

.popmake-contacte-nos:hover {
  background-color: #3c8b96;
}

<button class="popmake-contacte-nos">Contacte-nos</button>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:0)

只需将color添加到您的悬停选择器

即可

&#13;
&#13;
.popmake-contacte-nos {

  background-color: #fffff7;
  /* Green */
  border: none;
  color: black;
  font-weight: bold;
  padding: 15px 32px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  cursor: pointer;
}

.popmake-contacte-nos:hover {
  background-color: #3c8b96;
  color: white;
}
&#13;
<button class="popmake-contacte-nos">Contacte-nos</button>
&#13;
&#13;
&#13;