Learn how to remove the border from an editable element.
By default, when you write inside an element that has contenteditable
set to true
, that element gets a border around on focus. However, you can use CSS to remove the border:
<p contenteditable="true">This is an editable paragraph.</p>
Use the [attribute]
selector to select all elements that are contenteditable, and remove the border with the outline
property:
Tip: Go to our HTML contenteditable Attribute Reference to learn more about the global contenteditable attribute.
Tip: Go to our CSS [attribute] Selector to learn more about the [attribute] selector.
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!