问题描述
我想将鼠标光标从默认状态取消(改为显示白色箭头).我有一个简单的iframe.但是我认为iframe内有一个链接,可导致光标更改为指针/手形.如何更改该行为?
I want to cancel the mouse cursor from hand to default (where that white arrow appears instead). I have a simple iframe..but I think that there is a link inside the iframe that causes the cursor to change to pointer/hand.. how do I change that behavior?
这不起作用:
iframe{
cursor:default;
}
推荐答案
如果可以访问iframe src的CSS.添加-
If you have access to the CSS of iframe src. Add -
a{ cursor: default; } //in iframe src CSS
如果不是这样,如果iframe位于同一域中,则可以使用jquery进行此操作-
if not you can do this with jquery if the iframe is in the same domain -
$("#iframe").contents().find("a").css('cursor', 'default');
如果它是facebook之类的按钮,请检查此facebook开发者门户,它为您提供了样式其组件的选项- http://developers.facebook.com/docs/reference/plugins/like/
If it is facebook like button then check this facebook developer portal, it gives you options to style its components -http://developers.facebook.com/docs/reference/plugins/like/
这篇关于在iframe上更改鼠标光标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!