layout-grid-type Attribute | layoutGridType参数属性
| DHTML文档教程 |
Sets or retrieves the type of grid used for rendering the text content of an element. dhtml语法 HTML |
{ layout-grid-type : sType }
|
---|
Scripting | object.style.layoutGridType [ = sType ] |
---|
DHTML可能的值 sType | String that
specifies or receives one of the following values.loose | Default. Grid used for Japanese and Korean characters. In this mode, a constant width increment is applied to characters as follows: Wide characters and narrow kana characters are incremented to obtain an exact grid fit, as specified by the layoutgridchar property. other narrow characters, except connected and cursive characters, are incremented by half of the increment amount applied to wide characters. other characters, including connected and cursive characters, are not incremented, and behave as if no character grid is set. | strict | grid used for chinese, as well as japanese (genko) and korean characters. only the ideographs, kanas, and wide characters are snapped to the grid. other characters are rendered as usual, as though the layout-grid-mode attribute is set to none or line for text spans containing these characters. this mode also disables special text justification and character width adjustments normally applied to the element. finally, if there is no line-break opportunity in a text span that exceeds the line boundary, the text is pushed to the next line and the last part of the previous line is left blank. | fixed | grid used for monospaced layout. the layout rules are as follows: all noncursive characters are treated as equal; every character is centered within a single grid space by default. runs of cursive characters are treated as strips the same as in a strict grid. Justification or any other character-width changing behaviors are disabled. |
|
The property is read/write
for all objects except the following, for which it is read-only:
currentStyle.
The property has a default value of
loose. The Cascading Style Sheets (CSS) attribute is
inherited.
Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see about dynamic properties.
remarks web documents in asian languages, such as chinese or japanese, usually create a page layout for characters using a one- or two-dimensional grid. you can use the layout-grid attribute to incorporate this layout into web documents. the layout-grid-type attribute applies only to block-level elements.
DHTML代码范例
This example uses the layout-grid-type attribute to specify character layout for a block of text. <STYLE>
DIV.layout { layout-grid-type: strict }
</STYLE>
<DIV CLASS = "layout">
This is a block element containing a sentence of sample text.
</DIV>
是否符合公共标准
This property is part of a proposed addition to
Cascading Style Sheets (CSS) .
Applies To |
BLOCKQUOTE,
BODY,
CENTER,
currentStyle,
DD,
DIR,
DIV,
DL,
DT,
FIELDSET,
FORM,
hn,
HR,
LI,
LISTING,
MARQUEE,
MENU,
OL,
P,
PLAINTEXT,
PRE,
runtimeStyle,
style,
TABLE,
TD,
TH,
TR,
UL,
XMP | |
|