首页 技术 正文
技术 2022年11月16日
0 收藏 875 点赞 4,259 浏览 2146 个字
ylbtech-ionic-CSS:ionic 列表
1.返回顶部

1、

ionic 列表

列表是一个应用广泛的界面元素,在所有移动app中几乎都会使用到。

列表可以是基本文字、按钮,开关,图标和缩略图等。

列表项可以是任何的HTML元素。容器元素需要list类,每个列表项需要使用item类。

ionList和ionItem可以很容易的支持各种交互方式,比如,滑动编辑,拖动排序,以及删除项。

基本用法:

<ul class="list">
<li class="item">
...
</li>
</ul>

尝试一下 »

列表分隔符

我们可以使用 item-divider 类来为列表创建分隔符,默认情况下,列表项以不同的背景颜色和字体加粗来区分,但你也可以很容易的定制他。

<div class="list">  <div class="item item-divider">
Candy Bars
</div> <a class="item" href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >
Butterfinger
</a> ...</div>

尝试一下 »


带图标列表

我们可以在列表项的左侧或右侧指定图标。

使用 item-icon-left 图标在左侧, item-icon-right 设置图标在右侧。如果你需要在两边都有图标,则两个类都添加上即可。

以下实例中,我们在列表项中使用了 <a> 标签,使得每个列表项可点击。

列表项在使用 <a>或<button> 元素时,如果右侧未添加图标,则会自动添加上箭头号。

实例中,第一项只有左侧图标,第二项左右均有图标,第三项有右侧图标(还有注释 item-note),第四项有badge(标记)元素。

<div class="list">  <a class="item item-icon-left" href="#" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow" >
<i class="icon ion-email"></i>
Check mail
</a> <a class="item item-icon-left item-icon-right" href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >
<i class="icon ion-chatbubble-working"></i>
Call Ma
<i class="icon ion-ios-telephone-outline"></i>
</a> <a class="item item-icon-left" href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >
<i class="icon ion-mic-a"></i>
Record album
<span class="item-note">
Grammy
</span>
</a> <a class="item item-icon-left" href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >
<i class="icon ion-person-stalker"></i>
Friends
<span class="badge badge-assertive">0</span>
</a></div>

尝试一下 »


按钮列表

使用 item-button-right 或 item-button-left 类将按钮放在列表项中。

<div class="list">  <div class="item item-button-right">
Call Ma
<button class="button button-positive">
<i class="icon ion-ios-telephone"></i>
</button>
</div> ...</div>

尝试一下 »


带头像列表

使用 item-avatar 来创建一个带头像的列表:

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

尝试一下 »


缩略图列表

item-thumbnail-left 类用于添加左侧对齐的缩略图, item-thumbnail-right 类用于添加右侧对齐的缩略图。

<div class="list">    <a class="item item-thumbnail-left" href="#" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow" >
<img src="cover.jpg">
<h2>Pretty Hate Machine</h2>
<p>Nine Inch Nails</p>
</a> ...</div>

尝试一下 »


内嵌列表(inset list)

我们可以在容器当中内嵌列表,列表不会显示完整的宽度。

内嵌列表的样式为:list list-inset,与常规列表区别是,它设置了外边距(marign),类似于选项卡。

内嵌列表是没有阴影效果的,滚动时效果会更好。

<div class="list list-inset">    <div class="item">
Raiders of the Lost Ark
</div> ...</div>

尝试一下 »

2、

2.返回顶部

 

3.返回顶部

 

4.返回顶部

 

5.返回顶部

1、http://www.runoob.com/ionic/ionic-list.html2、 

6.返回顶部

 

ionic-CSS:ionic 列表 作者:ylbtech
出处:http://ylbtech.cnblogs.com/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,491
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,906
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,739
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,492
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:8,130
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:5,293