【问题标题】:How to replace the avatar image by a div in the Ionic List-Item Directive?如何用离子列表项指令中的 div 替换头像图像?
【发布时间】:2015-03-21 21:23:25
【问题描述】:

离子框架提供了一个directive 使用以下代码在左侧创建带有列表项和头像的列表:

<div class="list">
 <a class="item item-avatar" href="#">
      <img src="venkman.jpg">
      <h2>Venkman</h2>
      <p>Back off, man. I'm a scientist.</p>
    </a>
</div>

但是,化身必须是图像(看起来像是在搜索图像)。我们如何用自定义 div 或文本替换此图像?

【问题讨论】:

    标签: html css angularjs ionic-framework ionic


    【解决方案1】:

    解决了,使用 item-icon-left!

    <a class="item item-icon-left" href="#">
      <i class="icon ion-home"></i>
      <h2>Venkman</h2>
      <p>Back off, man. I'm a scientist.</p>
    </a>
    

    【讨论】:

    • 谢谢 :)
    猜你喜欢
    • 2016-11-29
    • 2021-05-15
    • 2016-02-25
    • 2021-07-31
    • 2022-10-01
    • 2017-05-23
    • 1970-01-01
    • 1970-01-01
    • 2021-12-19
    相关资源
    最近更新 更多