我想在 React 应用程序中嵌入 iFrame。 由于 iframe 中引用的外部 View 的特定行为,我想禁用除必须传播到 iframe 的悬停事件之外的所有内容。
import React from 'react';
import './App.css';
function App() {
return (
<div className="App">
<iframe src="https://localhost:8022" height="600" width="800"></iframe>
</div>
);
}
export default App;
我尝试过以各种方式使用 CSS 属性 pointer-events,但是 没有成功。关于如何做到这一点有什么建议吗?
最佳答案
截至 2019 年 8 月,我确定不能这样做。
关于css - 如何禁用除 iFrame 悬停之外的所有鼠标事件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56079417/