我希望有人能帮忙。我已经尝试了很多修复方法,但不知道我做错了什么。
我的网站是Clintonholmes.com
我的密码“想知道更多吗?”我主页上的按钮如下所示。
.button1 {
background-color: white;
border: none;
color: white;
padding: 16px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
-webkit-transition-duration: 0.4s; /* Safari */
transition-duration: 0.4s;
cursor: pointer;
}
.button1 {
background-color: white;
color: #663366;
border: 2px solid #663366;
}
.button1:hover {
background-color: #663366;
color: white;
a.color: white;
}出于某种原因,悬停时,字体是灰色的,而不是白色的。我做错了什么?
谢谢!克林顿
发布于 2017-02-04 20:34:32
这是CSS的特殊性问题。https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity
您可以通过使用具有更高特异性的选择器来修复它。这里有几种方法。
将.button1:hover更改为body.gppro-custom a:hover
或者您可以将color: white;更改为color: white!important; in .button1:hover
https://stackoverflow.com/questions/42045275
复制相似问题