jQuery   发布时间:2022-03-30  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了在jQuery mobile中创建一个侧边栏大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
通常,当您使用jQuery mobile创建一个data-role =“page”元素时,它将占用整个查看区域.因此,我不明白如何创建一个侧边栏.我想模拟以下内容,但是查看源代码并没有多大帮助:

http://jquerymobile.com/demos/1.0b1/docs/lists/index.html

请注意,当您单击列表中的项目时,它将变成侧边栏,并在主内容区域中显示一个列表.此外,如果显示屏收缩足够,则仅显示内容区域.是否有一个特殊的功能,在jQuery手机允许这个,还是有大量的不透明的javascript和CSS呢?

解决方法

查看beta Split View语法,您可以像这样控制“Sidebar”:
<div data-role="page" id="jqm-home" class="type-home"> 
    <div data-role="content"> 
        <div class="content-secondary"> 
            This would be the sidebar/split view on a tablet,would show up stacked on a mobile device
        </div><!-- end content-secondary -->    

        <div class="content-priMary"> 
            This is the main content. 

            If Tablet device this would be to the right of the above content,if mobile this would be below the above content.

        </div><!-- end content-priMary -->
    </div><!-- end content -->
</div><!-- end page -->

文件http://jquerymobile.com/demos/1.0b1/(右键单击查看源代码)

相关CSS:http://jquerymobile.com/demos/1.0b1/docs/_assets/css/jqm-docs.css

讨论媒体查询(他们以前做过什么)的一个体面的ALA文章http://www.alistapart.com/articles/responsive-web-design/

大佬总结

以上是大佬教程为你收集整理的在jQuery mobile中创建一个侧边栏全部内容,希望文章能够帮你解决在jQuery mobile中创建一个侧边栏所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。