如何更改悬停颜色CSS按钮

时间:2018-10-16 03:15:58

标签: html css colors hover

我正在设置网站,并且想更改按钮上的CSS颜色。

https://www.dropbox.com/s/usb8l3kpvnpoom8/bandicam%202018-10-15%2023-13-01-381.mp4?dl=0

如果您看到该视频,则当鼠标位于圆圈外时,按钮颜色为灰色。我想改用蓝色设置此颜色,并且当鼠标在圆圈上时,保持橙色。希望你有个主意

3 个答案:

答案 0 :(得分:1)

您可以设置标签并相应地扩展内容:

.buttoncolor { background-color: blue; }
.textcolor:hover { background-color: orange; }
<button class="buttoncolor">
  <a href="path/to/url" class="textcolor">some text</a>
</button>

答案 1 :(得分:0)

希望您下次可以提供CSS代码!

但是根据您网站上的代码,您可以更改背景颜色

.darna-icon-box.style4 .ibox-icon {
   background-color: blue; // change to hex value if you want
}

添加此内容以进行悬停

.darna-icon-box.style4 .ibox-icon:hover {
   background-color: orange; // change to hex value if you want
}

检查https://www.w3schools.com/css/css3_buttons.asp,以获取有关样式按钮的更多信息。

答案 2 :(得分:0)

您可以使用此格式更改悬停CSS背景颜色

 .your-class:hover {
   background-color: #777 !important; 
}

相关问题