简体   繁体   English

jQuery Mobile中的Navbar图标出现问题

[英]Issue with Navbar icon in jquery mobile

I need to add the icon for my navbar, so I have downloaded the icon from the following link, http://www.glyphish.com/ , I have downloaded the free icons. 我需要为导航栏添加图标,因此我已经从以下链接http://www.glyphish.com/下载了该图标,并下载了免费的图标。 then I am trying to add the icons in the code, I cons are not displaying? 然后我试图在代码中添加图标,我的缺点没有显示? What's wrong with code? 代码有什么问题?

<div data-role="navbar">
                <ul>
                    <li><a id="other-color" data-icon="img/193-location-arrow.png" data-iconpos="left" href="#">Set Filter</a></li>
                    <li><a id="other-color" data-icon="img/193-location-arrow.png" data-iconpos="right" href="#">Add page</a></li>
                </ul> 

Screenshot: 截图: 在此处输入图片说明

Create custom classes and modify their background-image using :after pseudo selector. 创建自定义类,并使用:after伪选择器修改其background-image

.ui-arrow:after {
  background-image: url(../193-location-arrow.png);
  background-size: 15px 15px;
}

.ui-location:after {
  background-image: url(../07-map-marker.png);
  background-size: 20px 20px;
}

Demo 演示

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM