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

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

问题描述

在新的 jQuery 移动版中有一个新的面板选项.我已经实现了这个并且它有效,但我想自定义面板的宽度.标准宽度是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天全站免登陆