非标
此特征是非标准的,且不在标准轨道中。不要在面向 Web 的生产站点中使用它:它不适用于每个用户。实现之间可能存在大的不兼容性,且行为将来可能改变。

弃用
This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the 兼容性表格 at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

user-modify property has no effect in Firefox. It was originally planned to determine whether or not the content of an element can be edited by a user.

/* Keyword values */
user-modify: read-only;
user-modify: read-write;
user-modify: write-only;
/* Global values */
user-modify: inherit;
user-modify: initial;
user-modify: unset;
					

This property has been replaced by the contenteditable 属性。

句法

-moz-user-modify property is specified as one of the keyword values from the list below.

只读

Default value. Contents are read-only.

read-write

The user is able to read and write contents.

read-write-plaintext-only
如同 read-write , but rich text formatting will be lost.
write-only

The user is able to edit the content, but not to read it.

形式定义

Value not found in DB!

形式句法

Syntax not found in DB!
					

范例

HTML

<div class="readwrite">The user is able to change this text.</div>
					

CSS

.readwrite {
  -moz-user-modify: read-write;
  -webkit-user-modify: read-write;
}
					

规范

Not part of any standard. A similar property, user-focus , was proposed in early drafts of a predecessor of the CSS3 UI specification , but was rejected by the working group.

浏览器兼容性

The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
user-modify 弃用 非标 Chrome 完整支持 1 Prefixed
完整支持 Prefixed
Prefixed Implemented with the vendor prefix: -webkit-
Edge 完整支持 12 Prefixed
完整支持 Prefixed
Prefixed Implemented with the vendor prefix: -webkit-
Firefox 部分支持 1 Prefixed 注意事项
部分支持 1 Prefixed 注意事项
Prefixed Implemented with the vendor prefix: -moz-
注意事项 While the CSS property is parsed and accepted, it does not have any effect.
注意事项 Scheduled for removal (see bug 1388910 ).
IE 不支持 No Opera 完整支持 15 Prefixed
完整支持 Prefixed
Prefixed Implemented with the vendor prefix: -webkit-
Safari 完整支持 3 Prefixed
完整支持 Prefixed
Prefixed Implemented with the vendor prefix: -webkit-
不支持 2 — 3 Prefixed
Prefixed Implemented with the vendor prefix: -khtml-
WebView Android 完整支持 37 Prefixed
完整支持 Prefixed
Prefixed Implemented with the vendor prefix: -webkit-
Chrome Android 完整支持 18 Prefixed
完整支持 Prefixed
Prefixed Implemented with the vendor prefix: -webkit-
Firefox Android 部分支持 4 Prefixed 注意事项
部分支持 4 Prefixed 注意事项
Prefixed Implemented with the vendor prefix: -moz-
注意事项 While the CSS property is parsed and accepted, it does not have any effect.
注意事项 Scheduled for removal (see bug 1388910 ).
Opera Android 完整支持 14 Prefixed
完整支持 Prefixed
Prefixed Implemented with the vendor prefix: -webkit-
Safari iOS 完整支持 5 Prefixed
完整支持 Prefixed
Prefixed Implemented with the vendor prefix: -webkit-
Samsung Internet Android 完整支持 1.0 Prefixed
完整支持 Prefixed
Prefixed Implemented with the vendor prefix: -webkit-
read-write-plaintext-only 弃用 非标 Chrome 完整支持 1 Edge 完整支持 12 Firefox 不支持 No IE 不支持 No Opera 完整支持 15 Safari 完整支持 3 WebView Android 完整支持 37 Chrome Android 完整支持 18 Firefox Android 不支持 No Opera Android 完整支持 14 Safari iOS 完整支持 5 Samsung Internet Android 完整支持 1.0

图例

完整支持

完整支持

部分支持

部分支持

不支持

不支持

非标。预期跨浏览器支持较差。

非标。预期跨浏览器支持较差。

弃用。不要用于新网站。

弃用。不要用于新网站。

见实现注意事项。

见实现注意事项。

要求使用供应商前缀或不同名称。

要求使用供应商前缀或不同名称。

另请参阅

元数据

  • 最后修改:
  1. CSS
  2. CSS 参考

Copyright  © 2014-2026 乐数软件    

工业和信息化部: 粤ICP备14079481号-1