CSS

-moz-user-modify

-moz-user-modify

非标准

此功能是非标准的,不处于标准轨道上.。不要在面向Web的生产站点上使用它:它并不适用于每个用户。实现之间也可能存在很大的不兼容性,而且这种行为在未来可能会发生变化。

-moz-user-modify属性没有效果。最初计划确定元素的内容为是否可以由用户编辑。

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

此属性与该contenteditable属性有关。在CSS3 UI规范的前身早期草案中user-focus提出了一个类似的属性,但被工作组拒绝。

初始值read-only
适用元素all elements
是否是继承属性yes
适用媒体interactive
计算值as specified
Animation typediscrete
正规顺序the unique non-ambiguous order defined by the formal grammar

语法

-moz-user-modify属性被指定为下面列表中的一个关键字值。

read-only默认值。内容是只读的。read-write用户可以读写内容。write-only用户可以编辑内容,但不能阅读。

正式语法

read-only | read-write | write-only

示例

CSS

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

HTML

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

结果

规范

user-modify在早期的CSS 3用户界面规范草案(2000年2月的工作草案,现在被CSS 3基本用户界面取代)

浏览器兼容性

FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support11-webkit(Yes)1-webkitNo support2No supportNo support2.0 -khtml 3.0 -webkit1

FeatureAndroidAndroid WebviewEdgeFirefox Mobile (Gecko)IE PhoneOpera MobileSafari MobileChrome for Android
Basic support??(Yes)-webkitNo support???181-webkit