简体   繁体   中英

not able to add icon in ion-select header

I'm using ion-select and I want a close icon button in the select header. I'm unable to do it. Can somebody help me to implement it.

在此处输入图像描述

My code:

<ion-item>
    <ion-label>Pet</ion-label>
    <ion-select placeholder="Select One">
      <ion-select-option value="f">Cat</ion-select-option>
      <ion-select-option value="m">Dog</ion-select-option>
    </ion-select>
  </ion-item>

Try replacing the ion-label to below code. hope it helps

    <a class="item item-icon-right" style="text-align: center;">        
          Pet
    <i class="icon ion-ios-close-outline"></i>
    </a>
      

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM