jQuery Mobile 入门教程 jQuery Mobile 图标

2024-02-25 开发教程 jQuery Mobile 入门教程 匿名 0

jQuery Mobile 图标

我们可以使用图标类在 jQuery Mobile 中 <a> 和 <button> 元素上添加图标。


jQuery 图标

在 jQuery Mobile 中,如需为按钮添加图标,请使用 data-icon 属性:

<a href="#anylink" data-role="button" data-icon="refresh">Refresh Page</a>

提示:在 <button> 或 <input> 元素中,您也可以使用 data-icon 属性。

下面我们列出了 jQuery Mobile 提供的所有可用图标:

属性值描述图标实例
data-icon="arrow-l"左箭头
data-icon="arrow-r"右箭头
data-icon="arrow-u"上箭头
data-icon="arrow-d"下箭头
data-icon="plus"加号
data-icon="minus"减号
data-icon="delete"删除
data-icon="check"检查
data-icon="home"首页
data-icon="info"信息
data-icon="grid"网格
data-icon="gear"工具
data-icon="search"搜索
data-icon="back"后退
data-icon="forward"前进
data-icon="refresh"更新
data-icon="star"星号
data-icon="alert"警告