jquery - jQuery Mobile 中的底部导航栏看起来像 iPhone 导航栏,可能吗?

标签 jquery jquery-mobile

我使用 jQuery mobile 创建了我的网站,我想构建与下图所示相同的底部工具栏。有人能指出我正确的方向吗?

jQuery mobile 提供的默认导航栏没有提供相同的外观。

以下是 jQuery 移动导航栏:http://jquerymobile.com/test/#/test/docs/toolbars/docs-navbar.html

enter image description here

最佳答案

对于您可以使用的图标:http://glyphish.com/

快速实时版本:http://jsfiddle.net/vh4Ca/62/

HTML

<div data-role="page">  
    <div data-role="content"> 
        <div data-role="footer" class="nav-glyphish-example"> 
            <div data-role="navbar" class="nav-glyphish-example" data-grid="d"> 
            <ul> 
                <li><a href="#" id="favorite" data-icon="custom">Favorite</a></li> 
                <li><a href="#" id="recent" data-icon="custom">Recent</a></li> 
                <li><a href="#" id="contacts" data-icon="custom">Contacts</a></li> 
                <li><a href="#" id="keypad" data-icon="custom">Keypad</a></li> 
                <li><a href="#" id="voicemail" data-icon="custom">Voicemail</a></li> 
            </ul> 
            </div> 
        </div> 
     </div>
 </div> 

CSS

.nav-glyphish-example .ui-btn .ui-btn-inner {
    padding-top: 40px !important; 
}

.nav-glyphish-example .ui-btn .ui-icon { 
    width: 45px!important; 
    height: 35px!important; 
    margin-left: -24px !important; 
    box-shadow: none!important; 
    -moz-box-shadow: none!important; 
    -webkit-box-shadow: none!important;
    -webkit-border-radius: none !important;
    border-radius: none !important; 
}

#favorite .ui-icon { 
    background-image: url(http://glyphish.com/images/demo.png);
    background-position: -345px -112px;
    background-repeat: no-repeat;
}

#recent .ui-icon { 
    background-image: url(http://glyphish.com/images/demo.png);
    background-position: -9px -61px;
    background-repeat: no-repeat; 
}

#contacts .ui-icon { 
    background-image: url(http://glyphish.com/images/demo.png);
    background-position: -9px -540px;
    background-repeat: no-repeat; 
}

#keypad .ui-icon { 
    background-image: url(http://glyphish.com/images/demo.png);
    background-position: -9px -783px;
    background-repeat: no-repeat; 
}

#voicemail .ui-icon { 
    background-image: url(http://glyphish.com/images/demo.png);
    background-position: -394px -733px;
    background-repeat: no-repeat; 
}

关于jquery - jQuery Mobile 中的底部导航栏看起来像 iPhone 导航栏,可能吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6303124/

相关文章:

android - 在 Eclipse 中使用 Phonegap Android 开发的 HTML 表单输入

jquery - 如何导入 .js 文件

javascript - jquery mobile显示html内容

jquery - 使用 jQuery Mobile 的动态页面

jquery - Tumblr Photoset 的灯箱显示不同尺寸的图像

javascript - 用循环替换多个 if 语句?

javascript - 使用 jQuery + PHP 处理表单时出现问题

javascript - jquery if else 语句

javascript - 对象不支持 igGrid 中的属性或方法 "_super"

ajax - Grails 中的 jQuery Ajax 请求