span
The <span> child component of <text> is used as a text modifier.
Required Permissions
None
Child Components
The <span> child component is supported.
Attributes
Attributes in Universal Attributes are supported.
NOTE: The focusable and disabled attributes are not supported.
Styles
Only the following style attributes are supported.
Whether the font size of the modified text changes with the system's font size settings. |
||||
Font style of the modified text. For details, see font-style of the text component. |
||||
Font weight of the modified text. For details, see font-weight of the text component. |
||||
Text decoration of the modified text. For details, see text-decoration of the text component. |
||||
Font family, in which fonts are separated by commas (,). Each font is set using a font name or font family name. The first font in the family or the font specified by Custom Font Styles is used for the text. |
Events
Only the click event in Universal Events is supported.
Method
Not supported
Example Code
<!-- xxx.hml -->
<div class="container">
<text class="title">
<span class="spanTxt">span</span>
</text>
</div>
/* xxx.css */
.container {
display: flex;
justify-content: center;
align-items: center;
}
.title {
font-size: 30px;
text-align: center;
width: 100%;
height: 100px;
}
.spanTxt{
color: chartreuse;
font-size: 100px;
}