html - 鼠标悬停 div 上的 CSS 无法正常工作

标签 html css

我正在研究一个非常简单的 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/

相关文章:

jquery - CSS 折叠/展开 div

html - 如何一次将悬停元素添加到多个元素?

php - 使用 PHP 在我的 CSS 样式表中创建变量有什么缺点?

html - 我如何在不折叠的情况下使导航项向右移动

html - 单选按钮在 Chrome v18 和 IE9 中不起作用

html - 为什么浏览器仍然在 HTML5 中注入(inject) <tbody>?

HTML 通知 : What to do on server-side

html - bootstrap 3.0 equalHeights 填充问题

javascript - Flex slider 在较小宽度的屏幕上重叠滑动

jquery - 无法在 jquery 中显示/隐藏按钮元素