简体   繁体   中英

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. 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.

.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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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