Style Properties

スタイルプロパティ

The following lists some of the custom style properties that Mozilla supports.

以下のリストは、 Mozilla がサポートするカスタムスタイルプロパティです。


プロパティ:

-moz-appearance

Used to cause an element to take its border, background style and size from the operating system's theme. This causes XUL elements to be drawn similar to the way the user's system draws such elements. This currently only has an effect on Windows XP and Mac OS X.

要素のボーダー、背景スタイル、サイズを、オペレーティングシステムのテーマから適用するのに用いる。これにより、ユーザのシステムが同様の要素を描画するのと同じように XUL 要素は描画される。現在は Windows XP と Mac OS X でのみ効果がある。

-moz-background-clip    Moz1.2

Indicates whether the background, either the color or image, should extend into the border area of the element. This property is similar to the CSS3 background-clip property.

  • border: The background extends into the border of the element. It will be drawn behind the border.
  • padding: The background does not extend into the border.

色あるいは画像の背景を、要素のボーダー領域にまで拡張するかどうかを示す。このプロパティは、 CSS3 の background-clip プロパティと同様である。

  • border: 背景を要素のボーダーにまで拡張する。ボーダーの裏側が描画される。
  • padding: 背景はボーダーまで拡張されない。
-moz-background-inline-policy    Moz1.3

Specifies how the background image of an inline element is determined when the content of the inline element wraps onto multiple lines.

  • bounding-box:
  • continuous: The background image wraps around on to each line as if the text had no line breaks. For example, if the image is 500 pixels and the inline box is 300 pixels, the first 300 pixels of the image appears on the first line, and the last 200 pixels followed by the first 100 pixels of the image appear on the second line. The image repeats until the end of the content.
  • each-box:

インライン要素の背景画像が Specifies how the background image of an inline element is determined when the content of the inline element wraps onto multiple lines.

  • bounding-box:
  • continuous: The background image wraps around on to each line as if the text had no line breaks. For example, if the image is 500 pixels and the inline box is 300 pixels, the first 300 pixels of the image appears on the first line, and the last 200 pixels followed by the first 100 pixels of the image appear on the second line. The image repeats until the end of the content.
  • each-box:
-moz-background-origin    Moz1.2

Determines how the background-position property is determined. This property is similar to the CSS3 background-origin property.

  • content: The position is relative to the content.
  • border: The position is relative to the border.
  • padding: The position is relative to the padding.

background-position プロパティがどのように決められるかを決定する。このプロパティは、 CSS3 の background-origin プロパティと同様である。

  • content: 位置は内容に相対的である。
  • border: 位置はボーダーに相対的である。
  • padding: 位置は padding に相対的である。
-moz-binding

Used to specify an XBL binding to use for the element. The property should be a URL of an XBL file containing the binding. The URL should contain an anchor to point to a specific binding with the XBL file, referenced by its id attribute.

ある XBL バインディングをその要素に用いることを指定するのに使用する。このプロパティは、バインディングを含む XBL ファイルの URL である必要がある。この URL には、 XBL ファイルの特定のバインディングを指定するためのアンカー、 id 属性で参照される、がなければならない。

-moz-border-bottom-colors

Sets the border colors for the bottom edge. It should be set to a list of colors. When an element has a border that is larger than a single pixel, each line of pixels uses the next color specified in this property. This eliminates the need for nested boxes. If the border is wider than the number of colors specified for this property, the remaining part of the border is the color specified by the border property.

下端にボーダー色を設定する。色のリストに設定する必要がある。要素が 1 ピクセルより大きいボーダーを持つとき、各線のピクセルはこのプロパティで指定した次の色を使用する。ネストしたボックスでは、この設定は取り除かれる。ボーダーがこのプロパティで指定した色の数より広い場合は、ボーダーの残りは border プロパティで指定した色になる。

-moz-border-left-colors

Sets the border colors for the bottom edge. See the -moz-border-colors-bottom property for more information.

左端にボーダー色を設定する。詳細は -moz-border-bottom-colors を参照。[訳注 : 原文では bottom edge になっているが、おそらくは left edge の間違い。また、 -moz-border-colors-bottom としているがプロパティ名では colors は最後である。]

-moz-border-radius

This property can be used to give borders rounded corners. This should be set to a numeric value indicating the amount of rounding to use. You must use a unit (usually px for pixels). A higher number makes the border rounder.

このプロパティはボーダーに丸みのある角をつけるのに用いる。使用する丸みの量を示す数値に設定する。単位 (ピクセルに対しては通常 px) を使わなければならない。値が大きいほどボーダーは丸くなる。

-moz-border-radius-bottomleft

Sets the rounding of the lower left corner of the border.

ボーダーの左下角の丸みを設定する。

-moz-border-radius-bottomright

Sets the rounding of the lower right corner of the border.

ボーダーの右下角の丸みを設定する。

-moz-border-radius-topleft

Sets the rounding of the upper left corner of the border.

ボーダーの左上角の丸みを設定する。

-moz-border-radius-topright

Sets the rounding of the upper right corner of the border.

ボーダーの右上角の丸みを設定する。

-moz-border-right-colors

Sets the border colors for the right edge. See the -moz-border-colors-bottom property for more information.

右端のボーダー色を設定する。詳細は -moz-border-bottom-colors を参照。

-moz-border-top-colors

Sets the border colors for the top edge. See the -moz-border-colors-bottom property for more information.

上端のボーダー色を設定する。詳細は -moz-border-bottom-colors を参照。

-moz-box-align

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. For boxes that have horizontal orientation, it specifies how its children will be aligned vertically. For boxes that have vertical orientation, it is used to specify how its children are algined horizontally. The pack 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 '-moz-box-align'.

  • start: Child elements are align 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.
  • center: Extra space is split equally along each side of the child elements, resulting the children being placed in the center of the box.
  • end: 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.
  • baseline: This value applies to horizontally oriented boxes only. It causes the child elements to be aligned so that their text labels are lined up.
  • stretch: 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.

align 属性は、ボックスのサイズがボックスの子要素のサイズ合計よりも大きくなったときに、その子要素をどのように配置するかを指定する。ボックスが水平方向の配置のときは、子要素を垂直方向にどう配置するかを指定する。ボックスが垂直方向の配置のときは、子要素を垂直方向にどう配置するかを指定するのに用いる。 pack 属性はこの配置に関係してくるが、反対方向での位置を指定するのに用いる。スタイルプロパティ '-moz-box-align' を使って、 align 属性の値を指定することもできる。[訳注 : XUL Element の aling 属性 を参照。(内容は同じ)]

  • start: 子要素はボックスにおいて左寄せまたは上寄せに揃えられる。ボックスが子要素のサイズの合計より大きい場合は、右端または下端に余白が生ずる。
  • center: 余白は子要素の両側に等分され、子要素はボックスの中央に配置される。
  • end: 子要素はボックスにおいて右寄せまたは下寄せに揃えられる。ボックスが子要素のサイズの合計より大きい場合は、左端または下端に余白が生ずる。
  • baseline: この値は横並びのボックスにのみ適用される。子要素はテキストラベルが揃うように揃えられる。
  • stretch: 子要素はボックスのサイズにぴったり合うように伸縮される。横並びのボックスにおいては、子要素はボックスの高さに合うように伸縮され、縦並びのボックスにおいては、子要素はボックスの幅に合うように伸縮される。ボックスのサイズが変更されると、子要素もそれに合うように伸縮される。平行方向における要素の伸縮には flex 属性を利用する。
-moz-box-direction

Specifies the direction in the which the children of a box are placed.

  • normal: Children are placed either from left to right or top to bottom in the order the elements appear in the XUL source or document tree.
  • reverse: Children are placed either from right to left or bottom to top in the order the elements appear in the XUL source or document tree.

Specifies the direction in the which the children of a box are placed.

  • normal: Children are placed either from left to right or top to bottom in the order the elements appear in the XUL source or document tree.
  • reverse: Children are placed either from right to left or bottom to top in the order the elements appear in the XUL source or document tree.
-moz-box-flex

Indicates the flexibility of an element. Flexible elements grow and shrink to fit their given space. The actual value is not relevant unless there are other flexible elements within the same container. Elements with larger flex values will grow more than elements with lower flex values, at the ratio determined by the two elements.

要素がフレキシブルであることを指示する。フレキシブルな要素は与えられた空間にちょうど収まるように伸縮する。値があてがわれていても、同一コンテナ内で他にフレキシブルな要素が無い限り、意味を持たない。より大きい flex 値を持つ要素は、より小さい flex 値をもつ要素より、値の比率の分だけ、より大きく伸ばされる。 [訳注 : XUL Element の flex 属性 を参照。]

-moz-box-ordinal-group

Indicates the ordinal group the element belongs to. Elements with a lower ordinal group are displayed before those with a higher ordinal group.

要素が属する順序グループ (ordinal group) を示す。低い順序グループの要素は、高い順序グループの要素より先に表示される。

-moz-box-orient

This is the corresponding style property for a XUL element's orient attribute. For elements that are types of boxes, it determines whether the children are laid out horizontally or vertically.

  • horizontal: The children of the element are placed horizontally in a row.
  • vertical: The children of the element are placed vertically in a column.

これは、 XUL 要素の orient 属性に対応するスタイルプロパティです。ボックス型である要素に対して、その子要素を水平方向に並べるか垂直方向に並べるかを決める。

  • horizontal: 子要素は水平方向に一行に配置される。
  • vertical: 子要素は垂直方向に一列に配置される。
-moz-box-pack

The pack attribute specifies where child elements of the box 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 align attribute is used to specify the position in the opposite direction. You can also specify the value of pack using the style property '-moz-box-pack'.

  • start: 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.
  • center: Extra space is split equally along each side of the child elements, resulting the children being placed in the center of the box.
  • end: 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.

pack 属性はボックスが子要素のサイズよりも大きい場合にボックスの子要素をどこに配置するかを指定する。横並びのボックスにおいては、子要素の水平方向の位置を指示する。縦並びのボックスにおいては、子要素の垂直方向の位置を指示する。対して、 align 属性は直交方向における位置取りを指定する。代わりにスタイルプロパティ '-moz-box-pack' を利用することもできる。 [訳注 : XUL Element の pack 属性 を参照。]

  • start: 子要素はボックスの左端または上端から順に配置される。子要素のサイズの合計よりもボックスのサイズが大きい場合はボックスの右端または下端に余白が生ずる。
  • center: 余白は子要素の両側に等分され、子要素はボックスの中央に配置される。
  • end: 子要素はボックスの右端または下端から順に配置される。子要素のサイズの合計よりもボックスのサイズが大きい場合はボックスの左端または上端に余白が生ずる。
-moz-box-sizing

This property determines how the width and height of the element is calculated. It affects the width and height properties.

  • content-box: The width and height properties specify the size of the element including the padding.
  • border-box: The width and height properties specify the size of the element including the padding and border.
  • padding-box: The width and height properties specify the size of the element. The padding, border and margin are added outside of this size.

このプロパティは、要素の幅や高さがどのように計算されるかを決める。 width プロパティと height プロパティに影響する。

  • content-box: width プロパティと height プロパティは、パディング (padding) を含む要素のサイズを指定する。
  • border-box: width プロパティと height プロパティは、パディングとボーダーを含む要素のサイズを指定する。
  • padding-box: width プロパティと height プロパティは、要素のサイズを指定する。パディング、ボーダー、マージンはこのサイズの外に追加される。
-moz-image-region

For elements that have an image, this property sets the area of the image that is used. You can set multiple elements to use the same image but use a different region of the image, reducing the amount of memory required. You can change this property to simulate animation. The syntax is similar to the clip property. All four values are relative to the upper left corner of the image.

    -moz-image-region: rect(top, right, bottom, left);  

画像を持つ要素では、このプロパティは使用する画像の領域を設定する。必要なメモリ量を減らして、複数の要素が同じ画像、ただしその画像の異なる領域を使用するように設定することができる。このプロパティを変更することで、アニメーションを行うことができる。この構文は clip プロパティと同様である。 4 つの値の全てが、画像の左上角からの相対値である。

    -moz-image-region: rect(top, right, bottom, left);  

-moz-key-equivalent

-moz-opacity

This property can be used to make an element partially transparent. Any content behind the element will be partially visible. This should be a decimal number between 0 and 1, where 0 means invisible and 1 means fully opaque. Thus, 0.5 means half-way between. Newer versions of Mozilla (1.7 and later) support the CSS3 property 'opacity'.

このプロパティは、要素を部分的に透明にするのに用いられる。要素の背後にあるどの内容でも、部分的に見えるようになる。 0 から 1 までの 10 進数を設定する必要がある。ここで、 0 は不可視 [訳注:要素が完全に透明] を意味し、 1 は完全に不透明を意味する。 0.5 はその中間を意味する。 Mozilla の最近のバージョン (1.7 及びそれ以降) は CSS3 の 'opacity' プロパティをサポートしている。

-moz-outline

This property can be used to set the outline of the element. An outline is like a border but has some differences in the way it is drawn. This is similar to the CSS2 outline property which Mozilla does not currently support.

このプロパティは、要素の外枠を設定するのに用いられる。外枠はボーダーのようなものであるが、描画のされ方が異なる。 Mozilla が現在サポートしていない、 CSS2 の outline プロパティと同様である。

-moz-outline-color

Sets the color of the outline.

外枠の色を設定する。

-moz-outline-radius

This property can be used to give outlines rounded corners. This should be set to a numeric value indicating the amount of rounding to use. You must use a unit (usually px for pixels). A higher number makes the outline rounder.

このプロパティは、外枠に丸みのある角をつけるのに用いる。使用する丸みの量を示す数値に設定する。単位 (ピクセルに対しては通常 px) を使わなければならない。値が大きいほど外枠は丸くなる。

-moz-outline-radius-bottomleft

Sets the rounding of the lower left corner of the outline.

外枠の左下角の丸みを設定する。

-moz-outline-radius-bottomright

Sets the rounding of the lower right corner of the outline.

外枠の右下角の丸みを設定する。

-moz-outline-radius-topleft

Sets the rounding of the upper left corner of the outline.

外枠の左上角の丸みを設定する。

-moz-outline-radius-topright

Sets the rounding of the upper right corner of the outline.

外枠の右上角の丸みを設定する。

-moz-outline-style

Sets the style of the border, which can have the same values as the border-style property.

ボーダーのスタイルを設定する。これは border-style プロパティと同じ値を持つことができる。

-moz-outline-width

Sets the width of the outline.

外枠の幅を設定する。

-moz-user-focus

Used to indicate whether the element can have the focus. By setting this to 'ignore', you can disable focusing the element, which means that the user will not be able to activate the element. The element will be skipped in the tab sequence. A similar property 'user-focus' has been proposed for CSS3.

  • ignore: The element does not accept the keyboard focus and will be skipped in the tab order.
  • normal: The element can accept the keyboard focus.

要素がフォーカスを持てるかどうかを示すのに用いる。 'ignore' に設定すると、要素にフォーカスを当てることができなくなる。つまり、ユーザは要素をアクティベイトできない、ということである。要素はタブ順でスキップされるようになる。 CSS3 には、同様のプロパティ 'user-focus' が提案されている。

  • ignore: 要素はキーボードフォーカスを受け取らず、タブ順でスキップされる。
  • normal: 要素はキーボードフォーカスを受け取る。
-moz-user-input

This can be used to indicate whether the value of the element can be modifed. This mainly applies to textboxes.

  • disabled: The user cannot edit the value of the textbox. The user may still select text in the textbox.
  • enabled: The user can edit the value of the textbox.

要素の値が変更可能かどうかを示すのに用いる。主としてテキストボックスに適用する。

  • disabled: ユーザはテキストボックスの値を編集することができない。テキストボックスのテキストを選択することはできる。
  • enabled: ユーザはテキストボックスの値を編集することができる。
-moz-user-select

Used to indicate whether the text of the element can be selected. This doesn't have any affect on content loaded as chrome, except in textboxes. A similar property 'user-select' has been proposed for CSS3.

  • none: The text of the element cannot be selected.
  • normal: The text can be selected by the user.

要素のテキストが選択可能かどうかを示すのに用いる。テキストボックスを除き、 chrome として読み込まれた内容には何の影響も持たない。 CSS3 には、同様のプロパティ 'user-select' が提案されている。

  • none: 要素のテキストは選択できない。
  • normal: ユーザはテキストを選択できる。
display

Although the display property is part of standard CSS, some additional values are allowed, for the XUL layout styles. You can use these values for non-XUL elements too, although they may produce unusual results.

  • -moz-box: Child elements are laid out horizontally or vertically.
  • -moz-inline-box:
  • -moz-grid: Child elements are laid out as a XUL grid.
  • -moz-inline-grid:
  • -moz-grid-group: Child elements are laid out as a group of grid columns or rows. This is the layout used by the rows and columns elements. You can use the orientation (-moz-box-orient) to set which direction. Rows would normally have vertical orientation and columns would have a horizontal orientation.
  • -moz-grid-line: Child elements are laid out as a single column or row of a grid. You can use the orientation (-moz-box-orient) to set which direction.
  • -moz-stack: Child elements are laid out one on top of each other like the XUL stack element.
  • -moz-inline-stack:
  • -moz-deck: Child elements are laid out one on top of each other like the XUL deck element. Unlike a stack, only the top element is displayed.
  • -moz-popup:
  • -moz-groupbox:

display プロパティは標準 CSS の一部であるが、 XUL レイアウトスタイルには値がいくつか追加されている。通常ではない結果を生成することになるが、これらの値を非 XUL 要素に用いることもできる。

  • -moz-box: 子要素は水平方向または垂直方向に並べられる。
  • -moz-inline-box:
  • -moz-grid: 子要素は XUL の grid として並べられる。
  • -moz-inline-grid:
  • -moz-grid-group: 子要素はグリッドの列または行のグループとして並べられる。 rows 要素及び columns 要素を使ったレイアウトである。 orient 属性 (-moz-box-orient) を使って、どの方向に並べるかを設定することができる。通常、行は垂直方向の並びを持ち、列は水平方向の並びを持つ。[訳注 : 原文では orientation (-moz-box-orient) であって属性の使用については触れていないが、訳では属性とした. XUL Element の orient 属性 を参照.]
  • -moz-grid-line: 子要素は一列または一行のグリッドとして並べられる。 orient 属性 (-moz-box-orient) を使って、どの方向に並べるかを設定することができる。
  • -moz-stack: XUL の stack 要素のように、子要素は互いに重ねられて並べられる。
  • -moz-inline-stack:
  • -moz-deck: XUL の deck 要素のように、子要素は互いに重ねられて並べられる。スタックとは異なり、最上部の要素のみが表示される。
  • -moz-popup:
  • -moz-groupbox:
overflow

Mozilla supports some additional values for the overflow property that are not in standard CSS. The overflow property is used to specify what happens when the content is too large for the container.

  • -moz-scrollbars-horizontal: Indicates that horizontal scrollbars should appear.
  • -moz-scrollbars-vertical: Indicates that vertical scrollbars should appear.
  • -moz-scrollbars-none: Indicates that no scrollbars should appear.

標準 CSS にはない overflow プロパティへの値の追加を、 Mozilla はサポートしている。 overflow プロパティは、内容がそのコンテナに比べてとても大きいときに何を行うか、を指定するのに用いられる。

  • -moz-scrollbars-horizontal: 水平方向スクロールバーが表示されるべき、ということを示す。
  • -moz-scrollbars-vertical: 垂直方向スクロールバーが表示されるべき、ということを示す。
  • -moz-scrollbars-none: スクロールバーは表示されるべきではない、ということを示す。

Copyright (C) 1999 - 2004 XulPlanet.com