我正在研究一个非常简单的 CSS,当鼠标移到它上面时,光标会变成一个指针。
我已经看了这段代码好几个小时了,我不明白为什么光标不会变成指针。当我移到 div 上时,它会短暂变化,然后变回箭头。
这可能非常简单,但我就是看不到。
.holder{
width:1000px;
overflow: auto;
margin: 0 auto;
font-family: 'Abel';
padding-left: 50px;
padding-top: 50px;
position: relative;
}
.action_pod{
float:left;
border-radius: 10px;
border: 1px solid #777;
font-family: 'Abel';
margin: 10px;
overflow: hidden;
padding:2px;
cursor:pointer;
}
.act_pod{
background-color: #cf9b63;
color: #fff;
width:100%;
border-radius: 7px;
padding-left: 3px;
padding-right: 3px;
font-size: 1em;
text-align: center;
cursor: pointer;
}
a:link{
text-decoration: none;
color:inherit;
cursor: pointer;
}
a:visited{
text-decoration: none;
color:inherit;
cursor:pointer;
}
<div class="holder">
<div class="action_pod">
<div class="act_pod">
<a href="add_raw_season.php">add new raw season</a>
</div>
</div>
</div>
更新:感谢所有的建议。我已经尝试了所有这些,但到目前为止没有任何效果。我想知道我的浏览器现在是否有问题...
更新 2:看起来它在我的 Mac 上出现了某种错误,因为任何网站上都没有链接使光标变成指针。令我惊讶的是,我的问题被标记了下来,因为我只是在我遇到的问题上寻求帮助,并提供了我所拥有的所有信息。
更新 3:显然这是在 Mac 上同时运行 Photoshop CC 的问题。如果将来有人遇到同样的问题,请在此处找到解决方案。 https://apple.stackexchange.com/questions/151370/my-cursor-is-wrong-in-certain-apps-safari-chrome-mail
最佳答案
你应该使用
divName:hover {
cursor: pointer;
}
关于html - 鼠标悬停 div 上的 CSS 无法正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38768382/