共用方式為


msGridRows property

Gets or sets one or more values that specify the height of each grid row within the object.

This property is read/write.

 

Syntax

HRESULT put_msGridRows(
  [in]          BSTR v
);

HRESULT get_msGridRows(
  [out, retval] BSTR *p
);

Property values

Type: BSTR

One or more row heights, separated by spaces.

String format

[ auto |height| min-content | max-content | minmax(min, max) ] + | none

CSS information

Applies To non-replaced block elements
Media visual paged
Inherited no
Initial Value auto

Standards information

Remarks

This property also supports a repeating syntax. If there are a large number of rows that are the same or exhibit a recurring pattern, a repeat syntax can be applied to define the rows in a more compact form. The repeated values are enclosed by parentheses, and are followed by an integer within brackets (for instance, [4]) that indicates how many times to repeat the values in parentheses. See Examples for a demonstration.

When space is allocated to a row, priority is given to those rows that have their height specified as a length or as a percentage. Any remaining space is then allocated to those rows that have their height specified as a proportion.

Each distance value defines a row that can be referred to by a number that corresponds to its position in the list. The first distance value specified defines a row 1, the second 2, and so on.

Child elements are clipped if they are too large to fit in the allocated space.

Examples

The following two examples illustrate the repeating IHTMLCSSStyleDeclaration2::msGridRows syntax. They are equivalent. There is a single column, and a pattern of four repeated rows: a 250px row followed by a 10px gutter.

<style type="text/css">
  #grid {
    display: -ms-grid;
    -ms-grid-rows: 10px 250px 10px 250px 10px 250px 10px 250px 10px;
    -ms-grid-columns: 1fr;
  } 

  /* Equivalent definition. */
  #grid {
    display: -ms-grid;
    -ms-grid-rows: 10px (250px 10px)[4];
    -ms-grid-columns: 1fr;
  }
</style>

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Header

Mshtml.h

IDL

Mshtml.idl

DLL

Mshtml.dll

See also

IHTMLCSSStyleDeclaration2::msGridRow