Microsoft Edge 中 HTML 页面上的奇怪文本光标

问题描述 投票:0回答:2

我正在使用 Edge,用户可以将光标放在网页的每个文本元素上。 (SO 具有相同的行为)

如何在我的网站上禁用此功能?

示例:

example

html css
2个回答
0
投票

检查

<html>
<body>
或任何其他父容器是否存在
contenteditable
属性。

这是一个示例,每个元素的内容都是可编辑的,并且会出现一个文本光标。

<body contenteditable="true">
  <header>
    <h1>Click this title</h1>
  </header>
  <main>
    <h2>Click this heading</h2>
    <p>Click this paragraph</p>
  </main>
  <footer>
    <p>Click this footer</p>
  </footer>
<body>


0
投票
© www.soinside.com 2019 - 2024. All rights reserved.