将鼠标光标更改为高于外部< iframe> [英] Change mousecursor above external <iframe>

查看:141
本文介绍了将鼠标光标更改为高于外部< iframe>的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个

< div style =cursor:move;>
< script type =text / javascriptsrc =h ** p://www.some-external-js>< / script
< / div>

外部JS加载一些包含内容的iframe:
< iframe src =somesource> / iframe>

the external JS loads some iframe with content: <iframe src="somesource"></iframe>

我想改变iframe上方的mousecursor,这是在我的div框。
不幸的是这不可能与CSS单独,因为iframes覆盖光标设置?任何想法?

I would love to change the mousecursor above the iframe, which is in my div box. Unfortunately this is not possible with CSS alone, because the iframes overwrites the cursor settings? Any idea?

推荐答案

这是不可能的。同源策略将阻止您修改任何iframe文档的CSS。

It's not possible. The Same Origin Policy will block you from modifying any of the iframe document's CSS.

您唯一可以做的是使用<$ c $来覆盖iframe的透明div c> position:absolute 和 z-index 。但是,iframe将无法使用。

The only thing you could do is overlay the iframe with a transparent div using position: absolute and a z-index. But then the iframe will become unusable.

这篇关于将鼠标光标更改为高于外部&lt; iframe&gt;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆