aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/css/-moz-user-input/index.html
blob: ac959b1014860479e6595135b2b0e0ed3a3be8a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
title: '-moz-user-input'
slug: Web/CSS/-moz-user-input
translation_of: Web/CSS/-moz-user-input
---
<div>{{Non-standard_header}}{{CSSRef}}</div>

<h2 id="Summary">Summary</h2>

<p>在Mozilla应用程序中, <code><strong>-moz-user-input</strong></code> 决定元素是否将接受用户输入。 A 类似的属性 <strong><code>user-focus</code></strong> 是在<a href="http://www.w3.org/TR/2000/WD-css3-userint-20000216">CSS3 UI规范的前身的早期草案</a>中提出的,但被工作组拒绝。</p>

<p>{{cssinfo}}</p>

<p><code>-moz-user-input</code> was one of the proposals leading to the proposed CSS 3 {{cssxref("user-input")}} property, which has not yet reached Candidate Recommendation (call for implementations).</p>

<p>For elements that normally take user input, such as a {{HTMLElement("textarea")}}, the initial value of <code>-moz-user-input</code> is <code>enabled</code>.</p>

<h2 id="Syntax">Syntax</h2>

<pre class="brush:css">/* Keyword values */
-moz-user-input: none;
-moz-user-input: enabled;
-moz-user-input: disabled;

/* Global values */
-moz-user-input: inherit;
-moz-user-input: initial;
-moz-user-input: unset;
</pre>

<h3 id="Values">Values</h3>

<dl>
 <dt>none</dt>
 <dd>The element does not respond to user input, and it does not become {{Cssxref(":active")}}.</dd>
 <dt>enabled</dt>
 <dd>The element accepts user input. For textboxes, this is the default behavior.</dd>
 <dt>disabled</dt>
 <dd>The element does not accept user input. However, this is not the same as setting {{XULAttr("disabled")}} to true, in that the element is drawn normally.</dd>
</dl>

<h3 id="Formal_syntax">Formal syntax</h3>

{{csssyntax}}

<h2 id="Examples">Examples</h2>

<pre class="brush:css">input.example {
  /* the user will be able to select the text, but not change it. */
  -moz-user-input: disabled;
}
</pre>

<h2 id="See_also">See also</h2>

<ul>
 <li>{{cssxref("-moz-user-focus")}}</li>
 <li>{{cssxref("-moz-user-modify")}}</li>
 <li>{{cssxref("-moz-user-select")}}</li>
</ul>