希望这将是一件容易修复的事情,但是我已经尝试寻找答案,但似乎没有合适的解决方法。
我正在尝试对按钮进行悬停效果:
button {
min-width: 20vw;
max-width: 40vw;
border: none;
color: white;
font-size: 1.5vw;
padding: 15px 32px;
text-align: center;
text-decoration: none;
background-color: blue;
border-radius: 20px;
transition: 0.4s;
box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
}
.button:hover {
color: black;
background-color: lightcyan;
}
当我在浏览器(vivaldi&edge)中对此进行测试时,没有任何变化。顺便说一下,测试站点是http://wyrdling.com/skulpturjagt。
PS。我尝试使用chrome开发人员工具,但对于了解如何阅读XD实在是太多了。
除非您的问题中有错字,否则请使用.button:hover
。这将适用于类别为的元素hover
。交换到button:hover
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句