【发布时间】:2021-12-31 11:28:34
【问题描述】:
我用 Typescript 研究 React 应用程序。我的问题是未知的 HTML iframe HTML 元素在开发服务器工作时显示在应用程序公用文件夹的 index.html 的 body 元素中的 id="root" 元素之外。它的 z-index 会阻止鼠标在应用程序上的所有输入。我怎样才能删除这个?你能帮帮我吗?
渲染文件
ReactDOM.render(
<React.StrictMode>
<ThemeProvider theme={theme}>
<App />
</ThemeProvider>
</React.StrictMode>,
document.getElementById('root')
);
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html>
开发服务器工作时 index.html 中的未知元素。
<body>
<div id="root"></div>
<iframe style="position: fixed; top: 0px;
left: 0px; width: 100%;
height: 100%; border: none;
z-index: 2147483647;">
</iframe>
</body>
【问题讨论】:
-
你使用浏览器扩展吗?
-
不,我没有任何扩展名。
标签: javascript typescript create-react-app