aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/xul_element_attributes/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/xul_element_attributes/index.html')
-rw-r--r--files/zh-cn/xul_element_attributes/index.html594
1 files changed, 0 insertions, 594 deletions
diff --git a/files/zh-cn/xul_element_attributes/index.html b/files/zh-cn/xul_element_attributes/index.html
deleted file mode 100644
index 9a98275da0..0000000000
--- a/files/zh-cn/xul_element_attributes/index.html
+++ /dev/null
@@ -1,594 +0,0 @@
----
-title: XUL element attributes
-slug: XUL_element_attributes
-tags:
- - XUL Attributes
-translation_of: Archive/Mozilla/XUL/XUL_Reference/XUL_element_attributes
----
-<span class="breadcrumbs xulRefAttr_breadcrumbs">« <a href="/zh-CN/docs/XUL_Reference">XUL Reference home</a></span> The following attributes are common to all XUL elements:
- <p></p><div id="a-align">
-
-
-<dl>
- <dt><code id="a-align"><a href="https://developer.mozilla.org/zh-CN/docs/Mozilla/Tech/XUL/Attribute/align">align</a></code></dt>
- <dd>Type: <em>one of the values below</em></dd>
- <dd>The align attribute specifies how child elements of the box are aligned, when the size of the box is larger than the total size of the children.<br>
- 当box的尺寸大于全部子元素的尺寸时,align属性指定box元素的对齐方式。
- <ul>
- <li>For boxes that have horizontal orientation, it specifies how its children will be aligned vertically.</li>
- <li>当box设置水平排列,它指定子元素如何垂直对齐。</li>
- <li>For boxes that have vertical orientation, it specifies how its children will be aligned horizontally.</li>
- <li>当box设置垂直排列,它指定子元素如何水平对齐</li>
- </ul>
- </dd>
- <dd>
- <dl>
- <dt><code>start</code></dt>
- <dd>Child elements are aligned starting from the left or top edge of the box. If the box is larger than the total size of the children, the extra space is placed on the right or bottom side.<br>
- 子元素从box的左边或顶部开始排列。如果box大于全部子元素的总和,多出的空间在右边或底部。</dd>
- <dt><code>center</code></dt>
- <dd>Extra space is split equally along each side of the child elements, resulting in the children being placed in the center of the box.<br>
- 多出的空间在子元素的周围,使子元素放置在box的中间。</dd>
- <dt><code>end</code></dt>
- <dd>Child elements are placed on the right or bottom edge of the box. If the box is larger than the total size of the children, the extra space is placed on the left or top side.<br>
- 子元素从box的右边或底部开始排列。如果box大于全部子元素的总和,多出的空间在左边或顶部部。</dd>
- <dt><code>baseline</code></dt>
- <dd>This value applies to horizontally oriented boxes only. It causes the child elements to be aligned so that their text labels are lined up.<br>
- 这个值只适用于水平方向的box元素。它让子元素的文本标签成一条直线。</dd>
- <dt><code>stretch</code></dt>
- <dd><em>This is the default value.</em> The child elements are stretched to fit the size of the box. For a horizontal box, the children are stretched to be the height of the box. For a vertical box, the children are stretched to be the width of the box. If the size of the box changes, the children stretch to fit. Use the flex attribute to create elements that stretch in the opposite direction.<br>
- 这是默认值。拉伸子元素来填充box。在水平的box元素中,子元素在高度上被拉伸。在垂直的box元素中,子元素在宽度上被拉伸。如果box元素尺寸改变,子元素也随之改变。使用flex属性创建的元素在相反方向被拉伸。</dd>
- <dt><code>left</code> <span title="This deprecated API should no longer be used, but will probably still work."><i class="icon-thumbs-down-alt"> </i></span></dt>
- <dd>The elements are aligned on their left edges.<br>
- 元素左边缘对齐。</dd>
- <dt><code>center</code> <span title="This deprecated API should no longer be used, but will probably still work."><i class="icon-thumbs-down-alt"> </i></span></dt>
- <dd>The elements are centered horizontally.<br>
- 元素水平居中。</dd>
- <dt><code>right</code> <span title="This deprecated API should no longer be used, but will probably still work."><i class="icon-thumbs-down-alt"> </i></span></dt>
- <dd>The elements are aligned on their right edges.<br>
- 元素右边缘对齐。</dd>
- </dl>
- </dd>
- <dd>The <a href="/en-US/docs/XUL/Attribute/pack" title="XUL/Attribute/pack">pack</a> attribute is related to the alignment but is used to specify the position in the opposite direction. You can also specify the value of align using the style property <a href="/zh-CN/docs/Web/CSS/-moz-box-align" title="此页面仍未被本地化, 期待您的翻译!"><code>-moz-box-align</code></a>.<br>
- <a href="/en-US/docs/XUL/Attribute/pack" title="XUL/Attribute/pack">pack</a>也是有关对齐的属性,但是指定相反方向的位置。你也可以在style中使用对齐的方式<a href="/zh-CN/docs/Web/CSS/-moz-box-align" title="此页面仍未被本地化, 期待您的翻译!"><code>-moz-box-align</code></a>。</dd>
- <dt></dt>
-</dl>
-</div> <div id="a-allowevents">
-
-
-<dl>
- <dt><code id="a-allowevents"><a href="https://developer.mozilla.org/zh-CN/docs/Mozilla/Tech/XUL/Attribute/allowevents">allowevents</a></code></dt>
- <dd>Type:
- <i>boolean<br>
- </i>
- 类型:boolean</dd>
- <dd>If true, events are passed to children of the element. Otherwise, events are passed to the element only.<br>
- 如果为真,事件向子元素传递。否则,事件只传递到当前元素。</dd>
-</dl>
-
-
-
-<p></p>
-</div> <div id="a-allownegativeassertions">
-
-
-<dl>
- <dt><code id="a-allownegativeassertions"><a href="https://developer.mozilla.org/zh-CN/docs/Mozilla/Tech/XUL/Attribute/allownegativeassertions">allownegativeassertions</a></code></dt>
- <dd>Type: <em>boolean</em><br>
- 类型:布尔类型</dd>
- <dd>Valid on any element that has a <code id="a-datasources"><a href="https://developer.mozilla.org/zh-CN/docs/Mozilla/Tech/XUL/Attribute/datasources">datasources</a></code> attribute. When multiple datasources are used, one may override an assertion from another. This attribute, if <code>true</code>, which is the default, allows a datasource to negate an earlier assertion.<br>
- 适用于任何有 <code id="a-datasources"><a href="https://developer.mozilla.org/zh-CN/docs/Mozilla/Tech/XUL/Attribute/datasources">datasources</a></code> 属性的元素。当使用多个数据源,一个数据源可以指定覆盖另一个。这个属性,如果为真,这是默认值,允许一个数据源覆盖之前的数据源。</dd>
-</dl>
-
-
-</div> <div id="a-class">
-
-
-<dl>
- <dt><code id="a-class"><a href="https://developer.mozilla.org/zh-CN/docs/Mozilla/Tech/XUL/Attribute/class">class</a></code></dt>
- <dd>Type:
- <i>string<br>
- </i>
- 类型:字符串(string)</dd>
- <dd>The style class of the element. Multiple classes may be specified by separating them with spaces.<br>
- 元素样式类型。多个类可以使用空格分开。</dd>
-</dl>
-
-
-
-<p></p>
-</div> <div id="a-coalesceduplicatearcs">
-
-
-<dl>
- <dt><code id="a-coalesceduplicatearcs"><a href="https://developer.mozilla.org/zh-CN/docs/Mozilla/Tech/XUL/Attribute/coalesceduplicatearcs">coalesceduplicatearcs</a></code></dt>
- <dd>Type: <em>boolean</em><br>
- 类型:布尔类型(boolean)</dd>
- <dd>Valid on any element that has a <code id="a-datasources"><a href="https://developer.mozilla.org/zh-CN/docs/Mozilla/Tech/XUL/Attribute/datasources">datasources</a></code> attribute. When multiple datasources are used, one may override an assertion from another. This attribute, if <code>true</code>, which is the default, allows a datasource to negate an earlier assertion.<br>
- 任何有 <code id="a-datasources"><a href="https://developer.mozilla.org/zh-CN/docs/Mozilla/Tech/XUL/Attribute/datasources">datasources</a></code> 属性的元素有效。当有多个数据源时使用,可以覆盖另一个声明。这个属性,如果是真,这是默认属性,允许一个数据源取消更早的声明。 </dd>
-</dl>
-</div> <div id="a-collapsed">
-
-
-<dl>
- <dt><code id="a-collapsed"><a href="https://developer.mozilla.org/zh-CN/docs/Mozilla/Tech/XUL/Attribute/collapsed">collapsed</a></code></dt>
- <dd>Type: <em>boolean</em><br>
- 类型:布尔类型(boolean)</dd>
- <dd>If <code>true</code>, then the element is collapsed and does not appear. It is equivalent to setting the CSS <a href="/en-US/docs/CSS/visibility" title="/en-US/docs/CSS/visibility">visibility</a> property to <code>collapse</code>.<br>
- 如果是真,那么这个元素可以折叠并且隐藏。相当于设置CSS的 <a href="/en-US/docs/CSS/visibility" title="/en-US/docs/CSS/visibility">visibility</a> 属性为 collapse。</dd>
-</dl>
-
-
-
-<p> </p>
-</div> <div id="a-container">
-
-
-<dl>
- <dt><code id="a-container"><a href="https://developer.mozilla.org/zh-CN/docs/Mozilla/Tech/XUL/Attribute/container">container</a></code></dt>
- <dd>Type: <em>boolean</em><br>
- 类型:布尔类型(boolean)</dd>
- <dd>Set to true if the element is to act as a container which can have child elements. This would be used for folders. This will be set by the template builder as needed.<br>
- 如果该元素是作为一个容器可以有子元素,设置为真。</dd>
-</dl>
-
-
-</div> <div id="a-containment">
-
-
-<dl>
- <dt><code id="a-containment"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/containment">containment</a></code></dt>
- <dd>Type: <em>URI</em></dd>
- <dd>This attribute specifies RDF properties (an RDF predicate) that indicate that a resource is a container. When generating content from a template this is used to determine which resources from the datasource are containers and thus can have child nodes and which ones are not containers.</dd>
- <dd>This attribute should be placed on the same element that the <code id="a-datasources"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/datasources">datasources</a></code> and the <code id="a-ref"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/ref">ref</a></code> attribute is on. It may be set to a space-separated list of RDF properties or resources.</dd>
-</dl>
-</div> <div id="a-context">
-
-
-<dl>
- <dt><code id="a-context"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/context">context</a></code></dt>
- <dd>Type: <em>id</em></dd>
- <dd>Should be set to the value of the id of the popup element that should appear when the user context-clicks on the element. A context-click varies on each platform. Usually it will be a right click. You can use the special value '_child' to indicate the first <code><a href="/en-US/docs/Mozilla/Tech/XUL/menupopup" title="menupopup">menupopup</a></code> child of the element.</dd>
-</dl>
-</div> <div id="a-contextmenu">
-
-
-<dl>
- <dt><code id="a-contextmenu"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/contextmenu">contextmenu</a></code></dt>
- <dd>Type: <em>id</em></dd>
- <dd>Alternate name for the <code id="a-context"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/context">context</a></code> attribute, but also has a corresponding script property <code><span><a href="https://developer.mozilla.org/en-US/docs/XUL/Property/contextMenu">contextMenu</a></span></code>.</dd>
-</dl>
-</div> <div id="a-datasources">
-
-
-<dl>
- <dt><code id="a-datasources"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/datasources">datasources</a></code></dt>
- <dd>Type: <em>space separated list of datasource URIs</em></dd>
- <dd>A space-separated list of datasources that an element's template will use for content generation. These can be either internal datasources such as rdf:bookmarks or a URL. The datasources attribute may be placed on most elements, although it will usually be found on trees and menu related elements. The element should have a <code><a href="/en-US/docs/Mozilla/Tech/XUL/template" title="template">template</a></code> element as a child.</dd>
- <dd>For RDF templates, the specified datasources are combined into a single composite datasource which holds the data from all of the datasources. This composite datasource is accesssible via a script through the database property.</dd>
- <dd>For XML datasources, only one source is used, either the URL of an XML file or an anchor reference to another element within the same document. For instance, the reference '#data' refers to an element with the id 'data'.</dd>
- <dd>If you plan on adding a datasource to an element but don't want one to be added right away, set this attribute to 'rdf:null'. This will make the element so that its contents can be generated from a datasource. Otherwise, you cannot add one later.</dd>
- <dd>When the XUL document is contained on a remote web site, the datasources may only be loaded from the same domain as the document.</dd>
-</dl>
-</div> <div id="a-dir">
-
-<dl>
- <dt>
- <code id="a-dir"><a href="https://developer.mozilla.org/zh-CN/docs/Mozilla/Tech/XUL/Attribute/dir">dir</a></code></dt>
- <dd>
- Type:
- <i>
- one of the values below</i>
- </dd>
- <dd>
- The direction in which the child elements of the element are placed.</dd>
-</dl>
-<dl>
- <dt>
- <code>normal</code></dt>
- <dd>
- For scales, the scale's values are ordered from left to right (for horizontal scales) or from top to bottom (for vertical scales)  For other elements, the elements are placed left to right or top to bottom in the order they appear in the XUL code</dd>
- <dt>
- <code>reverse</code></dt>
- <dd>
- For scales, the scale's values are ordered from right to left (for horizontal scales) or from bottom to top (for vertical scales). For other elements, they are placed right to left or bottom to top. This is reverse of the order in which they appear in the XUL code.</dd>
-</dl>
-<ul>
-</ul>
-
-<p> </p>
-</div> <div id="a-empty">
-
-
-<dl>
- <dt><code id="a-empty"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/empty">empty</a></code></dt>
- <dd>Type: <em>boolean</em></dd>
- <dd>Set to true if the element is a container that contains no children. This will be set by the template builder as needed.</dd>
-</dl>
-</div> <div id="a-equalsize">
-
-
-<dl>
- <dt><code id="a-equalsize"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/equalsize">equalsize</a></code></dt>
- <dd>Type: <em>one of the values below</em></dd>
- <dd>This attribute can be used to make the children of the element equal in size.
- <dl>
- <dt><code>always</code></dt>
- <dd>For a horizontally oriented element, this will make all of its children have the width of the widest child. For a vertically oriented element, this will make its children all have the height of the tallest child.</dd>
- <dt><code>never</code></dt>
- <dd>All of the children are displayed at the size required by the content or as specified by the <code id="a-width"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/width">width</a></code> and <code id="a-height"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/height">height</a></code> attributes or the CSS <a href="/en-US/docs/Web/CSS/width" title="The width CSS property sets an element's width. By default it sets the width of the content area, but if box-sizing is set to border-box, it sets the width of the border area."><code>width</code></a> and <a href="/en-US/docs/Web/CSS/height" title="The height CSS property specifies the height of an element. By default, the property defines the height of the content area. If box-sizing is set to border-box, however, it instead determines the height of the border area."><code>height</code></a> properties.</dd>
- </dl>
- </dd>
-</dl>
-</div> <div id="a-flags">
-
-
-<dl>
- <dt><code id="a-flags"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/flags">flags</a></code></dt>
- <dd>Type: <em>space-separated list of the values below</em></dd>
- <dd>A set of flags used for miscellaneous purposes. Two flags are defined, which may be the value of this attribute.
- <ul>
- <li><code>dont-test-empty</code>: For template generated content, the builder will not check that a container is empty.</li>
- <li><code>dont-build-content</code>: This flag may be used on a tree to indicate that content elements should not be generated. This results in a performance enhancement, but you will not be able to use the DOM functions to retrieve the tree rows.</li>
- </ul>
- </dd>
-</dl>
-</div> <div id="a-flex">
-
-
-<dl>
- <dt><code id="a-flex"><a href="https://developer.mozilla.org/zh-CN/docs/Mozilla/Tech/XUL/Attribute/flex">flex</a></code></dt>
- <dd>Type: <em>string</em> (representing an integer)<br>
- 类型:字符串 (string) 表示一个整数</dd>
- <dd>Indicates the flexibility of the element, which indicates how an element's container distributes remaining empty space among its children. Flexible elements grow and shrink to fit their given space. Elements with larger flex values will be made larger than elements with lower flex values, at the ratio determined by the two elements. The actual value is not relevant unless there are other flexible elements within the same container. Once the default sizes of elements in a box are calculated, the remaining space in the box is divided among the flexible elements, according to their flex ratios. Specifying a flex value of 0 has the same effect as leaving the flex attribute out entirely.<br>
- 指示一个元素的伸缩性,</dd>
-</dl>
-
-
-
-<p> </p>
-</div> <div id="a-height">
-
-
-<dl>
- <dt><code id="a-height"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/height">height</a></code></dt>
- <dd>Type: <em>string</em> (representing an integer)</dd>
- <dd>The preferred height of the element in pixels. The actual displayed height may be different if the element or its contents have a minimum or maximum height. The CSS height property may also be used.</dd>
-</dl>
-</div> <div id="a-hidden">
-
-
-<dl>
- <dt><code id="a-hidden"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/hidden">hidden</a></code></dt>
- <dd>Type: <em>boolean</em></dd>
- <dd>If set to true, the element is not displayed. This is similar to setting the CSS display property to 'none'.</dd>
-</dl>
-
-
-</div> <div id="a-id">
-
-<dl>
- <dt>
- <code id="a-id"><a href="https://developer.mozilla.org/zh-CN/docs/Mozilla/Tech/XUL/Attribute/id">id</a></code></dt>
- <dd>
- 类型: <em>元素的ID,在主窗口中必须唯一</em></dd>
- <dd>
- 一个唯一的标识一边开发者能够定义. 你可以使用方法 <code><a href="/cn/DOM/document.getElementById" title="cn/DOM/document.getElementById">getElementById()</a></code> 或者其他 DOM 的函数并在样式表中添加对元素的引用。</dd>
-</dl>
-
-<p></p>
-</div> <div id="a-insertafter">
-
-
-<dl>
- <dt><code id="a-insertafter"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/insertafter">insertafter</a></code></dt>
- <dd>Type: <em>id</em></dd>
- <dd>When an element is in an <code><a href="/en-US/docs/Mozilla/Tech/XUL/overlay" title="overlay">overlay</a></code>, the insertafter attribute specifies the <code id="a-id"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/id">id</a></code> of the element in the base window that the element should appear after. This attribute overrides the <code id="a-insertbefore"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/insertbefore">insertbefore</a></code> attribute. This value may be a comma-separated list of ids, which are scanned and the first one found in the window is used.</dd>
-</dl>
-</div> <div id="a-insertbefore">
-
-
-<dl>
- <dt><code id="a-insertbefore"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/insertbefore">insertbefore</a></code></dt>
- <dd>Type: <em>id</em></dd>
- <dd>When an element is in an <code><a href="/en-US/docs/Mozilla/Tech/XUL/overlay" title="overlay">overlay</a></code>, the insertbefore attribute specifies the <code id="a-id"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/id">id</a></code> of the element in the base window that the element should appear before. This value may be a comma-separated list of ids, which are scanned and the first one found in the window is used.</dd>
-</dl>
-</div> <div id="a-left">
-
-
-<dl>
- <dt><code id="a-left"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/left">left</a></code></dt>
- <dd>Type: <em>string</em> (representing an integer)</dd>
- <dd>For elements placed directly within a <code><a href="/en-US/docs/Mozilla/Tech/XUL/stack" title="stack">stack</a></code>, specifies the pixel position of the left edge of the element relative to the left edge of the stack.</dd>
-</dl>
-</div> <div id="a-maxheight">
-
-
-<dl>
- <dt><code id="a-maxheight"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/maxheight">maxheight</a></code></dt>
- <dd>Type: <em>string</em> (representing an integer)</dd>
- <dd>The maximum height of the element. This corresponds to the max-height CSS property.</dd>
-</dl>
-</div> <div id="a-maxwidth">
-
-
-<dl>
- <dt><code id="a-maxwidth"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/maxwidth">maxwidth</a></code></dt>
- <dd>Type: <em>string</em> (representing an integer)</dd>
- <dd>The maximum width of the element. This corresponds to the max-width CSS property.</dd>
-</dl>
-</div> <div id="a-menu">
-
-
-<dl>
- <dt><code id="a-menu"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/menu">menu</a></code></dt>
- <dd>Type: <em>id</em></dd>
- <dd>Alternate name for the <code><code id="a-popup"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/popup">popup</a></code></code> attribute, but also has a corresponding script property 'menu'.</dd>
-</dl>
-</div> <div id="a-minheight">
-
-
-<dl>
- <dt><code id="a-minheight"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/minheight">minheight</a></code></dt>
- <dd>Type: <em>string</em> (representing an integer)</dd>
- <dd>The minimum height of the element. This corresponds to the min-height CSS property.</dd>
-</dl>
-</div> <div id="a-minwidth">
-
-
-<dl>
- <dt><code id="a-minwidth"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/minwidth">minwidth</a></code></dt>
- <dd>Type: <em>string</em> (representing an integer)</dd>
- <dd>The minimum width of the element. This corresponds to the min-width CSS property.</dd>
-</dl>
-</div> <div id="a-mousethrough">
-
-
-<dl>
- <dt><code id="a-mousethrough"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/mousethrough">mousethrough</a></code></dt>
- <dd>Type: <em>one of the values below</em></dd>
- <dd>Determines whether mouse events are passed to the element or not. If this attribute is not specified, the value is inherited from the parent of the element. If no ancestor has the mousethrough attribute set, the default value is <code>never</code>.
- <dl>
- <dt><code>always</code></dt>
- <dd>Mouse events are transparent to the element. This means that the element will not receive any mouse events due to either clicking or movement. Child elements may override this if they specify mousethrough="never".</dd>
- <dt><code>never</code></dt>
- <dd>Mouse events are passed to the element as normal.</dd>
- </dl>
- </dd>
-</dl>
-
-
-</div> <div id="a-observes">
-
-
-<dl>
- <dt><code id="a-observes"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/observes">observes</a></code></dt>
- <dd>Type: <em>id</em></dd>
- <dd>Set to an id of a <code><a href="/en-US/docs/Mozilla/Tech/XUL/broadcaster" title="broadcaster">broadcaster</a></code> element that is being observed by the element. If an attribute changes in the broadcaster it is also changed in the observer.</dd>
-</dl>
-</div> <div id="a-ordinal">
-
-
-<dl>
- <dt><code id="a-ordinal"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/ordinal">ordinal</a></code></dt>
- <dd>Type: <em>string</em> (representing an integer)</dd>
- <dd>An integer which specifies the position of the element within its parent. By default, elements appear in the order they appear in the XUL code. The ordinal attribute can be used to change the order. Note the default ordinal for elements is 1. You can retrieve the displayed order by using the properties of the <code><span><a href="https://developer.mozilla.org/en-US/docs/XUL/Property/boxObject">boxObject</a></span></code> of the container.</dd>
-</dl>
-</div> <div id="a-orient">
-<p><strong>布局(orient)</strong></p>
-<dl>
- <dd>
- 值类型:可以是下面值中的一种。<br>
- 指定了子控件的布局(orient)为水平分布的(horizontally)或者是垂直分布的(vertically)。默认值依赖于控件本身。你也可以使用<a href="cn/-moz-box-orient">-moz-box-orient</a>中的样式属性。
- <ul>
- <li><strong>horizontally</strong>: 子控件会被按照在xul源文件中出现的位置依次布置在一行中。</li>
- <li><strong>vertically</strong>: 子控件会被按照在xul源文件中出现的位置依次布置在一列中。</li>
- </ul>
- </dd>
-</dl>
-</div> <div id="a-pack">
-
-
-<dl>
- <dt><code id="a-pack"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/pack">pack</a></code></dt>
- <dd>Type: <em>one of the values below</em></dd>
- <dd>The pack attribute specifies where child elements of the <code><a href="/en-US/docs/Mozilla/Tech/XUL/box" title="box">box</a></code> are placed when the box is larger that the size of the children. For boxes with horizontal orientation, it is used to indicate the position of children horizontally. For boxes with vertical orientation, it is used to indicate the position of children vertically. The <code id="a-align"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/align">align</a></code> attribute is used to specify the position in the opposite direction. You can also specify the value of pack using the style property <a href="/en-US/docs/Web/CSS/-moz-box-pack" title="The -moz-box-pack and -webkit-box-pack CSS properties specify how a -moz-box or -webkit-box packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. See Flexbox for more about the properties of flexbox elements."><code>-moz-box-pack</code></a>.
- <dl>
- <dt><code>start</code></dt>
- <dd>Child elements are placed starting from the left or top edge of the box. If the box is larger than the total size of the children, the extra space is placed on the right or bottom side.</dd>
- <dt><code>center</code></dt>
- <dd>Extra space is split equally along each side of the child elements, resulting the children being placed in the center of the box.</dd>
- <dt><code>end</code></dt>
- <dd>Child elements are placed on the right or bottom edge of the box. If the box is larger than the total size of the children, the extra space is placed on the left or top side.</dd>
- </dl>
- </dd>
-</dl>
-
-
-</div> <div id="a-persist">
-
-<dl>
- <dt>
- <code id="a-persist"><a href="https://developer.mozilla.org/zh-CN/docs/Mozilla/Tech/XUL/Attribute/persist">persist</a></code></dt>
- <dd>
- Type:
- <i>
- space-separated list of attribute names</i>
- </dd>
- <dd>
- A space-separated list of attributes that are maintained when the window is closed. When the window is re-opened, the values of persistent attributes are restored. In Mozilla, persistent attributes are stored in the per-profile file <code>localstore.rdf</code>. Persistence can also be stored using the <code>document.persist</code> function. In order for persistence to work, the element must also have an <code id="a-id"><a href="https://developer.mozilla.org/zh-CN/docs/Mozilla/Tech/XUL/Attribute/id">id</a></code>.</dd>
-</dl>
-<p> </p>
-
-<p></p>
-</div> <div id="a-popup">
-
-
-<dl>
- <dt><code id="a-popup"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/popup">popup</a></code></dt>
- <dd>Type: <em>id</em></dd>
- <dd>Should be set to the value of the <code><code id="a-id"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/id">id</a></code></code> of the <code><code><a href="/en-US/docs/Mozilla/Tech/XUL/popup" title="popup">popup</a></code></code> element that should appear when the user clicks on the element.</dd>
-</dl>
-
-
-</div> <div id="a-position">
-
-
-<dl>
- <dt><code id="a-position"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/position">position</a></code></dt>
- <dd>Type: <em>string</em> (representing an integer)</dd>
- <dd>When an element is in an <code><a href="/en-US/docs/Mozilla/Tech/XUL/overlay" title="overlay">overlay</a></code>, the position is an index where the child is inserted. The position is one-based, so use a value of 1 to place the element at the beginning. This attribute is ignored if either an <code id="a-insertbefore"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/insertbefore">insertbefore</a></code> or <code id="a-insertafter"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/insertafter">insertafter</a></code> attribute matches an element.</dd>
-</dl>
-</div> <div id="a-preference-editable">
-
-
-<dl>
- <dt><code id="a-preference-editable"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/preference-editable">preference-editable</a></code></dt>
- <dd><strong><span class="highlightgreen">Mozilla 1.8</span></strong></dd>
- <dd>Type: <em>boolean</em></dd>
- <dd>If <code>true</code>, the element may be used as one that modifies a preference in a <code><a href="/en-US/docs/Mozilla/Tech/XUL/prefwindow" title="prefwindow">prefwindow</a></code>. The <code id="a-preference"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/preference">preference</a></code> attribute may be used to connect to a <code><a href="/en-US/docs/Mozilla/Tech/XUL/preference" title="preference">preference</a></code> element. This is useful for custom elements implemented in XBL. The element should fire <code>change</code>, <code>command</code>, or <code>input</code> event when the value is changed so that the preference will update accordingly.<br>
- <br>
- See the <a href="/en/Preferences_System/New_attributes" title="en/Preferences System/New attributes">pref system documentation</a> for more information.</dd>
-</dl>
-</div> <div id="a-querytype">
-
-
-<dl>
- <dt><code id="a-querytype"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/querytype">querytype</a></code></dt>
- <dd>Type: <em>string</em></dd>
- <dd>Indicates the type of datasource used in a template. Firefox 3 provides 3 built-in datasources: 'rdf', default, 'xml' and 'storage'. Extensions may provide support for additional datasources.</dd>
-</dl>
-</div> <div id="a-ref">
-
-
-<dl>
- <dt><code id="a-ref"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/ref">ref</a></code></dt>
- <dd>Type: <em>URI</em></dd>
- <dd>For template-generated elements, this attribute is used to specify the root RDF node where content generation begins. This will correspond to the value of an about attribute on an RDF container. This attribute should be placed alongside the datasources attribute.</dd>
-</dl>
-</div> <div id="a-removeelement">
-
-
-<dl>
- <dt><code id="a-removeelement"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/removeelement">removeelement</a></code></dt>
- <dd>Type: <em>id</em></dd>
- <dd>When placed on an element in an <code><a href="/en-US/docs/Mozilla/Tech/XUL/overlay" title="overlay">overlay</a></code>, it indicates that the element in the base file should be removed from the window.</dd>
-</dl>
-</div> <div id="a-sortDirection">
-
-
-<dl>
- <dt><code id="a-sortDirection"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/sortDirection">sortDirection</a></code></dt>
- <dd>Type: <em>one of the values below</em></dd>
- <dd>Set this attribute to set the direction that template-generated content is sorted. Use the <code id="a-sortResource"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/sortResource">sortResource</a></code> attribute to specify the sort key.
- <dl>
- <dt><code>ascending</code></dt>
- <dd>The data is sorted in ascending order.</dd>
- <dt><code>descending</code></dt>
- <dd>The data is sorted in descending order.</dd>
- <dt><code>natural</code></dt>
- <dd>The data is sorted in natural order, which means the order that it is stored in.</dd>
- </dl>
- </dd>
-</dl>
-</div> <div id="a-sortResource">
-
-
-<dl>
- <dt><code id="a-sortResource"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/sortResource">sortResource</a></code></dt>
- <dd>Type: <em>URI</em></dd>
- <dd>For template-generated content, this specifies the sort key, if you would like the content to be sorted. The key should be the full URI of the RDF resource to sort by, for example '<code><span class="nowiki">http://home.netscape.com/NC-rdf#Name</span></code>'. Place this attribute on the same element as the <code id="a-datasources"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/datasources">datasources</a></code> attribute. Use <code id="a-sortResource2"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/sortResource2">sortResource2</a></code> to specify a secondary sort key.</dd>
-</dl>
-</div> <div id="a-sortResource2">
-
-
-<dl>
- <dt><code id="a-sortResource2"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/sortResource2">sortResource2</a></code></dt>
- <dd>Type: <em>URI</em></dd>
- <dd>The value of this attribute is the URI of an RDF predicate that serves as a secondary key for sorted content.</dd>
-</dl>
-</div> <div id="a-statustext">
-
-
-<dl>
- <dt><code id="a-statustext"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/statustext">statustext</a></code></dt>
- <dd>Type: <em>string</em></dd>
- <dd>Used to set the text that appears on the status bar when the user moves the mouse over the element. Mozilla doesn't adjust the status bar automatically however. This attribute serves only as a place to keep the text. In Firefox, this text is automatically placed in the <code><code><a href="/en-US/docs/Mozilla/Tech/XUL/statusbar" title="statusbar">statusbar</a></code></code> for menuitems on the menu bar.</dd>
-</dl>
-
-
-</div> <div id="a-style">
-
-
-<dl>
- <dt><code id="a-style"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/style">style</a></code></dt>
- <dd>Type: <em>CSS inline style</em></dd>
- <dd>CSS style rules to be applied to the element. Syntax is as in the HTML style attribute. It is preferred to put style rules in style sheets.</dd>
-</dl>
-</div> <div id="a-template">
-
-
-<dl>
- <dt><code id="a-template"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/template">template</a></code></dt>
- <dd>Type: <em>id</em></dd>
- <dd>For template generated elements, this attribute may optionally be placed on the root node (the element with the <code id="a-datasources"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/datasources">datasources</a></code> attribute) to refer to a template that exists elsewhere in the XUL code. This template attribute should be set to the <code id="a-id"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/id">id</a></code> of the <code><a href="/en-US/docs/Mozilla/Tech/XUL/template" title="template">template</a></code> element. This might be used to share a single template between multiple trees or menus. If this attribute is not specified, there should be a template element directly inside the node.</dd>
-</dl>
-</div> <div id="a-tooltip">
-
-
-<dl>
- <dt><code id="a-tooltip"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/tooltip">tooltip</a></code></dt>
- <dd>Type: <em>id</em></dd>
- <dd>Should be set to the value of the <code id="a-id"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/id">id</a></code> of the <code><a href="/en-US/docs/Mozilla/Tech/XUL/tooltip" title="tooltip">tooltip</a></code> or <code><a href="/en-US/docs/Mozilla/Tech/XUL/panel" title="panel">panel</a></code> element that should be used as a tooltip window when the mouse hovers over the element for a moment. The tooltip will automatically disappear when the mouse is moved. If this attribute is set to '_child', the first <code><a href="/en-US/docs/Mozilla/Tech/XUL/tooltip" title="tooltip">tooltip</a></code> child element inside the element is used.</dd>
-</dl>
-</div> <div id="a-tooltiptext">
-
-
-<dl>
- <dt><code id="a-tooltiptext"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/tooltiptext">tooltiptext</a></code></dt>
- <dd>Type: <em>string</em></dd>
- <dd>Used to set the text which appears in the tooltip when the user moves the mouse over the element. This can be used instead of setting the tooltip to a popup for the common case where it contains only text. The tooltip is displayed in a default tooltip which displays only a label, however the default tooltip may be changed by setting the default attribute on a <code><a href="/en-US/docs/Mozilla/Tech/XUL/tooltip" title="tooltip">tooltip</a></code> element.</dd>
-</dl>
-</div> <div id="a-top">
-
-
-<dl>
- <dt><code id="a-top"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/top">top</a></code></dt>
- <dd>Type: <em>string</em> (representing an integer)</dd>
- <dd>For elements placed directly within a <code><a href="/en-US/docs/Mozilla/Tech/XUL/stack" title="stack">stack</a></code>, specifies the pixel position of the top edge of the element relative to the top edge of the stack.</dd>
-</dl>
-</div> <div id="a-uri">
-
-
-<dl>
- <dt><code id="a-uri"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/uri">uri</a></code></dt>
- <dd>Type: <em>string</em></dd>
- <dd>For template-generated content, the attribute should be placed on the element where content generation should begin. Thus, it should be placed on an element that is a descendant of a template. The value should be set to <code>rdf:*</code>.</dd>
-</dl>
-
-<dl>
- <dd>Elements that appear inside the element with the attribute will be repeated for each node in the RDF datasource. Elements outside will appear only once.</dd>
-</dl>
-</div> <div id="a-wait-cursor">
-
-
-<dl>
- <dt>
- <code id="a-wait-cursor"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/wait-cursor">wait-cursor</a></code></dt>
- <dd>
- Type: <em>boolean</em></dd>
- <dd>
- Set this attribute to true to have the cursor switch to a waiting cursor while the mouse is hovering over the element. Usually, you would only use this on the <code><a href="/en-US/docs/Mozilla/Tech/XUL/window" title="window">window</a></code> element or other top-level elements. In order to revert to the normal cursor state call the method <code>removeAttribute("wait-cursor")</code> when the process effectively has ended otherwise the wait cursor might never disappear.</dd>
-</dl>
-
-</div> <div id="a-width">
-
-
-<dl>
- <dt><code id="a-width"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/width">width</a></code></dt>
- <dd>Type: <em>string</em> (representing an integer)</dd>
- <dd>The preferred width of the element. The value should not include a unit as all values are in pixels. The actual displayed width may be different if the element or its contents have a minimum or maximum width, or the size is adjusted by the flexibility or alignment of its parent. The CSS width property may also be used.</dd>
-</dl>
-
-
-</div><p></p>