jQuery Mobile面板宽度 [英] jQuery Mobile panel width

查看:193
本文介绍了jQuery Mobile面板宽度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在新的jQuery mobile中有一个新的面板选项。我已经实现了这和它的工作,但我想自定义面板的宽度。标准宽度为272px,这对我有用。我尝试使用

In the new jQuery mobile there is a new panel option. I have implemented this and it works, but I would like to customize the width of the panel. The standard width is 272px, which is a bit much for my use. I have tried using the

.ui-panel{width:150px;}

CSS选择器,但这只是调整面板的内容。面板本身保持可见,并保持相同的宽度。使用firefox和chrome中的检查器我没有能够找到负责此面板的正确div。有人能帮我找到一种方法,以正确的方式调整面板的大小?

CSS selector, but this simply resizes the contents of the panel. The panel itself stays visible and remains the same width. Using the inspectors in firefox and chrome I have not been able to find the correct div responsible for this panel. Could anybody help me find a way to resize the panel in the correct manner?

推荐答案

我想出来了!这不是那么复杂,真的。我自己只是使用structure.css但如果你使用其他CSS文件,可以更多的自定义。无论如何...

I figured it out! It's not that complex, really. I myself am just using structure.css but if you're using other CSS files there MAY be more to customize. Anyway...

使用您喜欢的编辑器,替换17em并将其替换为您实际需要的值。左侧面板有样式,右侧面板有样式。我不会急于通过这个整个过程,因为在这里或那里可能有一个不相关的17em。只需要一分钟...

Using your favorite editor, do a find & replace for "17em" and replace that with the value you actually want. There's styling for left panels and styling for right panels. I wouldn't rush through this whole process as there could be an unrelated "17em" here or there. It just takes a minute...

这是一个简单的答案,但我对自己很满意:p

It's a simple answer but I'm happy with myself :p

这篇关于jQuery Mobile面板宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆