jquery mobile 自定义图标
html代码
带有图标的按钮:
![]()
图标 Icon set
图标组 Icon set
<a href=”index.html” data-role=”button” data-icon=”delete” data-iconpos=”right”>Delete</a>
一个图标在右边的按钮:
![]()
一个图标在文字上方的按钮:
![]()
一个图标在文字下方的按钮:
![]()
<a href=”index.html” data-role=”button” data-icon=”delete” data-iconpos=”notext”>Delete</a>
一个只有图标的按钮
![]()
自定义图标 Custom Icons
图标和地址 Icons and themes
“A”主题下的图标按钮
“B”主题下的图标按钮
“C”主题下的图标按钮
很多时候,系统图标不能满足我们的要求,那么如何自定义导航图标?查找了很多相关资料、google、百度一番之后,发现通过id来定义是个不错的选择,看一下做好的效果,不错吧!

1 |
.footer .ui-btn .ui-btn-inner{ padding-top:60px; } |
2 |
.footer .ui-btn .ui-icon{width:60px;height:60px;} |
3 |
#btn-about .ui-icon{background:url(../images/icon.png) no-repeat 0 50%;background-size:300px 60px;} |
4 |
#btn-value .ui-icon{background:url(../images/icon.png) no-repeat -60px 50%;background-size:300px 60px;} |
5 |
#btn-technology .ui-icon{background:url(../images/icon.png) no-repeat -120px 50%;background-size:300px 60px;} |
6 |
#btn-case .ui-icon{background:url(../images/icon.png) no-repeat -180px 50%;background-size:300px 60px;} |
7 |
#btn-contactus .ui-icon{background:url(../images/icon.png) no-repeat -240px 50%;background-size:300px 60px;} |
Html Code:
1 |
<div class="footer" data-theme="a" data-role="footer" data-position="fixed"> |
2 |
<div data-role="navbar"> |
3 |
<ul> |
4 |
<li><a id="btn-about" href="#page1" data-icon="custom" data-transition="slide">关于</a></li> |
5 |
<li><a id="btn-value" href="#page2" data-icon="custom" data-transition="slide">价值</a></li> |
6 |
<li><a id="btn-technology" href="#page3" data-icon="custom" data-transition="slide">技术</a></li> |
7 |
<li><a id="btn-case" href="#page4" data-icon="custom" data-transition="slide">案例</a></li> |
8 |
<li><a id="btn-contactus" class="ui-btn-active" href="#page5" data-icon="custom" data-transition="slide">联系</a></li> |
9 |
</ul> |
10 |
</div> |
11 |
</div> |
jquery mobile 自定义图标的更多相关文章
- JQuery Mobile - 自定义图标!
环境 jquery1.9.1.js jquery mobile 1.4.2版 图标制作 18x18px 底透明的png图标 使用图标,这个过程开始怎么弄都不行,只有个灰色的圆出现,不见图标:或者出现图 ...
- jQuery Mobile 自定义导航条图标
1.jQuery Mobile 自定义导航条图标
- jQuery Mobile 自定义按钮图标
自定义css样式---红色部分必须加上 .ui-icon-user-black:after {background:url('../image/user-black.png') no-repeat 0 ...
- Jquery mobile 自定义 返回按钮 data-rel="back"
data-rel="back" 第一个页面 主页面 studentmaster.html 通过下面js脚本跳转到详情页面 window.location.href="s ...
- jQuery Mobile 图标无法显示
对jquery mobile来说,使用data-icon属性配置,可以设置元素的图标.图标没有变成右箭头,而是如下图所示: //已经设置了图标 ,data-icon="home" ...
- jQuery Mobile 列表内容
jQuery Mobile 列表缩略图 对于大于 16x16px 的图像,请在链接中添加 <img> 元素. jQuery Mobile 将自动把图像调整至 80x80px: 实例: &l ...
- jQuery Mobile 入门基础教程
jQuery Mobile是jQuery在手机上和平板设备上的版本.jQuery Mobile 不仅会给主流移动平台带来jQuery核心库,而且会发布一个完整统一的jQuery移动UI框架. jQue ...
- 取消Jquery mobile自动省略的文本
在使用jquery moblie做移动客户端app时,listview控件下的列表文本不能完全显示,只能显示一行,超过字数jquery mobile会自动用省略号代替.很是纠结啊. 最后在一个岛国网站 ...
- jQuery Mobile 图标
jQuery 图标 如需在 jQuery Mobile 中向按钮添加图标,请使用 data-icon 属性: <a href="#anylink" data-role=&qu ...
随机推荐
- 苹果内购和 Apple Pay
作者:CC老师_MissCC链接:http://www.jianshu.com/p/e3bc47e81785來源:简书 苹果内购 1.什么是内购? 如果你购买的商品,是在本app中使用和消耗的,就一定 ...
- 请求一个域名ip的缓存用处
前言 摘录自操作系统,这一段的内容很有启发,稍微加上自己的理解,写一篇博客记录一下. 缓存 缓存成功解决了速度不匹配设备之间的数据传输,并且在一般情况下,是整个系统的瓶颈:缓存的出现,有效减少了低速I ...
- HTML 5 桌面提醒
<script> function showNotice(title,msg){ var Notification = window.Notification || window.mozN ...
- AC自动机例题
P3808 [模板]AC自动机(简单版) [题目描述] 给定n个模式串和1个文本串,求有多少个模式串在文本串里出现过. #include<bits/stdc++.h> using name ...
- LeetCode记录之13——Roman to Integer
能力有限,这道题采用的就是暴力方法,也只超过了39%的用户.需要注意的就是罗马数字如果IXC的后一位比前一位大的采取的是减的方式. Given a roman numeral, convert it ...
- bzoj1004 [HNOI2008]Cards Burnside定理+背包
题目传送门 思路:首先是Burnside引理,要先学会这个博客. Burnside引理我们总结一下,就是 每种置换下不动点的数量之和除以置换的总数,得到染色方案的数量. 这道题,显然每种 ...
- archlinux安装的软件
1. 火狐浏览器 #pacman -S firefox 使用ffmpeg播放HTML5的多媒体内容 $sudo pacman -S ffmpeg https://wiki.archlinux.o ...
- Flutter FormatException: Bad UTF-8 encoding 0xc3 (at offset 172)
是文件编码问题. 1,打开 Android Studio 进入设置界面 Ctrl + Alt + S 或 File --> Settings 打开如下界面: 2,将 Project Encode ...
- 2.rabbitmq 系列教程
rabbitmq系列教程-文章[转] 视频分享: 链接:https://pan.baidu.com/s/1s_Qr2A1o0s8Ru0exK62jqg 提取码:eb68
- python 爬虫系列04-电影天堂连接爬虫
学习的第四个爬虫 from lxml import etree import requests BASE_D = 'http://www.dytt8.net' headers = { 'User-Ag ...