Flutter教程

ion-list-header

概要(CONTENTS)

Ionic4项目中我们可以使用Ionic4列表组件ion-list-header对项目进行布局。

ion-list-header官方文档地址:https://ionicframework.com/docs/api/list-header

ListHeader a header component for a list. Unlike ItemDivider, ListHeaders are styled to be stand-out from the rest of the list items.

ion-list-header 用法(Usage)

<ion-list>
  <ion-list-header>
    <ion-label>Itemsion-label>
  ion-list-header>
  <ion-item>Item 1ion-item>
  <ion-item>Item 2ion-item>
  <ion-item>Item 3ion-item>
  <ion-item>Item 4ion-item>
  <ion-item>Item 5ion-item>
ion-list>

ion-list-header 属性(Properties)

color

Description

The 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.

Attribute color
Type string | undefined

mode

Description

The mode determines which platform styles to use.

Attribute mode
Type "ios" | "md"

ion-list-header中的CSS 自定义属性

Name Description
--background Background of the list header
--color Color of the list header text