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 内,头像将会调整大小以适应父组件。要将头像放置在项目的左侧或右侧,请分别将 slot 设置为 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.