Skip to main content

ion-text

shadow

文本组件是一个简单的组件,可用于设置任何元素的文本颜色样式。ion-text 元素应该封装该元素,以便更改该元素的文本颜色。

¥The text component is a simple component that can be used to style the text color of any element. The ion-text element should wrap the element in order to change the text color of that element.

基本用法

¥Basic Usage

主题化

¥Theming

可以通过更改 colors Ionic 提供的任何默认值来自定义文本组件。

¥The text component can be customized by changing any of the default colors Ionic provides.

属性

¥Properties

color

DescriptionThe color to use from your application's color palette. Default options are: "primary", "secondary", "tertiary", "success", "warning", "danger", "light", "medium", and "dark". For more information on colors, see theming.
Attributecolor
Type"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string | undefined
Defaultundefined

mode

DescriptionThe mode determines which platform styles to use.
Attributemode
Type"ios" | "md"
Defaultundefined

事件

¥Events

No events available for this component.

方法

¥Methods

No public methods available for this component.

CSS 阴影部分

¥CSS Shadow Parts

No CSS shadow parts available for this component.

CSS 自定义属性

¥CSS Custom Properties

No CSS custom properties available for this component.

插槽

¥Slots

No slots available for this component.