css - 如何禁用除 iFrame 悬停之外的所有鼠标事件?

标签 css reactjs iframe

我想在 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/

相关文章:

javascript - 如何在客户端对字符串进行 ESlint?

javascript - Express 不为 React 重定向

iframe - 直接使用iframe时,youtube无法访问播放器控件

javascript - 尝试使用 jQuery 单击 Iframe 内的按钮

javascript - 在 iframe 上时检测鼠标移动吗?

android - 手机按像素设置宽度

javascript - 如何设置文本区域中文本的格式或样式?

html - 如何修复我的列表,这样我就不必在图标更新前切换两次?

javascript - React.js 给出了意外的 token

css - 为什么我看不到 :before border when using flexboxes