我试图在将鼠标悬停在图像上时设置 cursor: pointer。我当前的代码似乎只适用于图像的顶部,而不适用于整个图像。
我已经用这个 jsfiddle 重现了这个问题
我的 CSS 类如下所示:
.profile-avatar-img {
cursor:pointer;
}
知道为什么光标只对图像顶部的几个像素有效吗?
最佳答案
margin-top
似乎是导致问题的原因
改变
.profile-buttons {
margin-right: 15px;
margin-top: 110px;
}
到
.profile-buttons {
margin-right: 15px;
margin-top: 0px;
}
关于html - 光标仅更改为图像部分的指针,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27317112/