【问题标题】:Change text inside button on :hover更改按钮内的文本:悬停
【发布时间】:2018-07-19 11:48:06
【问题描述】:

如何在 :hover 上更改“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>

【问题讨论】:

  • 嗯...简单的color ?
  • Temani,我发誓我昨天“明显”尝试过(颜色:白色;),但没有成功!有什么毛病什么的。无论如何,我很抱歉浪费你的时间做这样的事情。但它现在可以工作了!

标签: html css onhover


【解决方案1】:

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

.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;
}
<button class="popmake-contacte-nos">Contacte-nos</button>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-01-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-02-11
    • 2017-07-21
    相关资源
    最近更新 更多