Constructor
new HTMLStyle()
Extends
Member
(static) _ABSOLUTE :int
- Default Value:
- 0x4
(static) _BACKGROUND_SET :int
- Default Value:
- 0x4000
(static) _CSS_BLOCK :int
- Default Value:
- 0x1
(static) _DISPLAY_NONE :int
- Default Value:
- 0x2
(static) _FLOAT_RIGHT :int
- Default Value:
- 0x8000
(static) _HEIGHT_SET :int
- Default Value:
- 0x2000
(static) _LINE_ELEMENT :int
- Default Value:
- 0x10000
(static) _LISTERRESZIE :int
- Default Value:
- 0x80000
(static) _NEWFONT :int
- Default Value:
- 0x1000
(static) _NOWARP :int
- Default Value:
- 0x20000
(static) _WIDTH_SET :int
- Default Value:
- 0x8
(static) _WIDTHAUTO :int
- Default Value:
- 0x40000
(static) ADDLAYOUTED :int
- Default Value:
- 0x200
(static) ALIGN_CENTER :String
- Default Value:
- "center"
(static) ALIGN_LEFT :String
- Default Value:
- "left"
(static) ALIGN_RIGHT :String
- Default Value:
- "right"
(static) defaultFont :String
- Default Value:
- "Arial"
(static) EMPTY :HTMLStyle
(static) InheritProps :Array
(static) styleSheets :Object
Stylesheet information.
(static) VALIGN_BOTTOM :String
- Default Value:
- "bottom"
(static) VALIGN_MIDDLE :String
- Default Value:
- "middle"
(static) VALIGN_TOP :String
- Default Value:
- "top"
_letterSpacing :int
- Default Value:
- 0
absolute :Boolean
align :String
Represents the horizontal alignment of text paragraphs using this text format.
- Inherited From:
- Default Value:
- "left"
asPassword :Boolean
Specifies whether the text field is a password text field.
If the value of this property is true, the text field is considered a password text field, and the input characters are hidden by using an asterisk rather than the actual character. If false, the text field is not considered a password text field.- Inherited From:
bgColor :String
The text background color is represented as a string.
- Inherited From:
block :Boolean
Indicates whether the element is displayed as a block level element.
borderColor :String
The text border color is represented as a string.
- Inherited From:
color :String
- Default Value:
- "#000000"
cssFloat :String
Floating direction.
display :String
family :String
- Default Value:
- defaultFont
font :String
fontSize :int
- Default Value:
- defaultFontSize
height :Object
italic :Boolean
Indicates whether the text in this text format is italic.
- Inherited From:
- Default Value:
- false
letterSpacing :int
Spacing.
lineElement :Boolean
Is it a row element?.
lineHeight :Number
Row height.
- Default Value:
- 0
ower :Sprite
padding :Array
Default margin information
[左边距,上边距,右边距,下边距] (margins are in pixels)
- Inherited From:
paddingLeft :Number
paddingTop :Number
position :String
Location type of element.
stroke :Number
The stroke width (in pixels).
The default value of 0, said no stroke.- Inherited From:
- Default Value:
- 0
strokeColor :String
Color color, expressed as a string.
- Inherited From:
- Default Value:
- "#000000";
valign :String
Represents the vertical alignment of text paragraphs using this text format.
- Inherited From:
- Default Value:
- "top"
visible :Boolean
whiteSpace :String
Sets how to handle the space within an element.
width :Object
wordWrap :Boolean
Indicates whether the text field that uses this text format is automatically fed.
If the value of wordWrap is true, the text field is automatically wrapped; if the value is false, the text field does not automatically line up.- Inherited From:
- Default Value:
- false。
Methods
attrs(attrs)
Sets the property value of the object based on the passed property name and property value list.
Parameters:
Name | Type | Description |
---|---|---|
attrs |
Array
|
Property name and property value list. |
cssText(text)
Set the CSS style string.
Parameters:
Name | Type | Description |
---|---|---|
text |
String
|
CSS style string. |
heighted(sprite) → {Boolean}
Is the height set?.
Parameters:
Name | Type | Description |
---|---|---|
sprite |
Object
|
Display object Sprite. |
Returns:
- Type:
-
Boolean
A Boolean indicates whether the height has been set.
inherit(src)
Copy the incoming CSSStyle property value.
Parameters:
Name | Type | Description |
---|---|---|
src |
HTMLStyle
|
The CSSStyle object to copy. |
parseCSS(text, uri)
Parsing CSS style text.
Parameters:
Name | Type | Description |
---|---|---|
text |
String
|
CSS style text. |
uri |
URL
|
URL object. |
parseOneCSS(text, clipWord) → {Array}
Split the parsed CSS style string through the incoming delimiter, and return the style list.
Parameters:
Name | Type | Description |
---|---|---|
text |
String
|
CSS style string. |
clipWord |
String
|
Delimiter; |
Returns:
- Type:
-
Array
Style list.
render()
- Inherited From:
size(w, h)
Set width height.
Parameters:
Name | Type | Description |
---|---|---|
w |
Number
|
Width. |
h |
Number
|
Height. |