Skip to main content

ion-avatar

shadow

头像是通常封装图片或图标的圆形组件。它们可以用来代表一个人或一个对象。

¥Avatars are circular components that usually wrap an image or icon. They can be used to represent a person or an object.

头像可以单独使用,也可以在任何元素内部使用。如果放置在 ion-chipion-item 内部,头像将调整大小以适合父组件。要将头像放置在项目的左侧或右侧,请将插槽分别设置为 startend

¥Avatars can be used by themselves or inside of any element. If placed inside of an ion-chip or ion-item, the avatar will resize to fit the parent component. To position an avatar on the left or right side of an item, set the slot to start or end, respectively.

基本用法

¥Basic Usage

碎屑头像

¥Chip Avatar

条目头像

¥Item Avatar

主题化

¥Theming

CSS 自定义属性

¥CSS Custom Properties

属性

¥Properties

No properties available for this component.

事件

¥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

NameDescription
--border-radiusBorder radius of the avatar and inner image

插槽

¥Slots

No slots available for this component.