UnitType 枚举

定义

指定度量单位。Specifies the unit of measurement.

public enum class UnitType
public enum UnitType
type UnitType = 
Public Enum UnitType
继承
UnitType

字段

Cm 6

用厘米作为度量单位。Measurement is in centimeters.

Em 8

度量单位相对于父元素的字体高度。Measurement is relative to the height of the parent element's font.

Ex 9

度量单位相对于父元素字体的小写字母 x 的高度。Measurement is relative to the height of the lowercase letter x of the parent element's font.

Inch 4

用英寸作为度量单位。Measurement is in inches.

Mm 5

用毫米作为度量单位。Measurement is in millimeters.

Percentage 7

度量单位为相对于父元素的百分比。Measurement is a percentage relative to the parent element.

Pica 3

用十二点活字作为度量单位。Measurement is in picas. 十二点活字表示 12 个点。A pica represents 12 points.

Pixel 1

用像素作为度量单位。Measurement is in pixels.

Point 2

用点作为度量单位。Measurement is in points. 一点表示 1/72 英寸。A point represents 1/72 of an inch.

注解

UnitType枚举表示不同的受支持的度量单位。The UnitType enumeration represents the different supported measurement units. 度量值可以用像素、点、十二点活字、英寸、毫米、厘米、百分比、em 或 ex 表示。Measurements can be represented in pixels, points, picas, inches, millimeters, centimeters, percentages, em, or ex.

点是表示1/72 英寸的度量单位。A Point is a unit of measurement that represents 1/72 of an inch.

十二点活字是等于12点的单位。A Pica is a unit that equals 12 points.

百分比是相对于父元素的测量单位。A Percentage is a unit of measurement that is relative to a parent element. 例如, 如果段落的字体大小为10个像素, 则可将一个短语放在段落中, 其字体大小指定为 200%。For example, if the font size of a paragraph is 10 pixels, you can place a phrase inside the paragraph with a font size specified as 200%. 该短语的字号将变为段落的字体大小的两倍或20个像素。The font size of the phrase becomes twice the font size of the paragraph, or 20 pixels.

Em 是相对于父元素的字体高度的度量单位。An Em is a unit of measurement that is relative to the height of a parent element's font. 例如, 如果段落的字体大小为10个像素, 则可将一个短语置于段落中, 将其字体大小指定为 2 em。For example, if the font size of a paragraph is 10 pixels, you can place a phrase inside the paragraph with a font size specified as 2 em. 该短语的字号将变为段落的字体大小的两倍或20个像素。The font size of the phrase becomes twice the font size of the paragraph, or 20 pixels.

Ex 是相对于父元素的字体的小写字母 x 的高度的度量单位。An Ex is a unit of measurement that is relative to the height of the lowercase letter x of the parent element's font. 例如, 如果段落的字体大小为10个像素, 则可将一个短语放在段落中, 并将字体大小指定为 2 ex。For example if the font size of a paragraph is 10 pixels, you can place a phrase inside the paragraph with a font size specified as 2 ex. 该短语的字号将变为段落中小写字母 x 的字体大小的两倍。The font size of the phrase becomes twice the font size of a lowercase letter x in the paragraph.

适用于

另请参阅