的区别?-6ren"> 的区别?-我正在使用 Ionic Framework 构建一个应用程序.我从 the getting started guide 中描述的标准 ionic 标签启动项目开始。 .在列表中,我现在想放置一个分隔符-6ren">
gpt4 book ai didi

html - Ionic 框架中
的区别?

转载 作者:太空狗 更新时间:2023-10-29 15:04:59 26 4
gpt4 key购买 nike

我正在使用 Ionic Framework 构建一个应用程序.我从 the getting started guide 中描述的标准 ionic 标签启动项目开始。 .在列表中,我现在想放置一个分隔符 as described here :

<div class="list">
<div class="item item-divider"> <!-- this creates the divider -->
Candy Bars
</div>
<a class="item" href="#">
Butterfinger
</a>
...
</div>

然而,令我惊讶的是,我列表中的预生成代码如下所示:

<ion-list>
<ion-item class="item-toggle">
Enable Friends
<label class="toggle">
<input type="checkbox" ng-model="settings.enableFriends">
<div class="track">
<div class="handle"></div>
</div>
</label>
</ion-item>
</ion-list>

所以这让我想知道:<ion-list> 之间有什么区别(如果有的话)和 <div class="list">

根据预生成的代码,我尝试使用 <ion-divider> 创建分隔线,但这没有用。所以我住在<div class="item item-divider">效果很好。我只是想知道这些“魔术”之间有什么区别<ion-xxx>标签和传统 <div class="xxx">标签?

欢迎提供任何信息!

最佳答案

我相信使用标准的 HTML 格式,例如 <div class="list">将为您提供您正在寻找的所有 CSS 样式,但在某些情况下,使用 Ionic 指令将提供纯 HTML/CSS 可能缺少的附加功能。查看this link访问 Ionic 论坛以获取有关该主题的更多信息。

关于html - Ionic 框架中 <ion-list> 和 <div class ="list"> 的区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29120777/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com