jQuery Mobile panel width

后端 未结 7 1084
梦如初夏
梦如初夏 2020-12-30 09:53

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

7条回答
  •  情歌与酒
    2020-12-30 10:48

    I had same issue myself and followed tylerl's advice to replace 17em with the width I needed. Which worked well, except for the fact that I was using google cdn to load css, so I could not change it directly and in general I am not a big fan of changing library code.

    So playing around with it a little I came up with this code for redefining default jquery mobile's css https://gist.github.com/geekdevs/5433246

    You can configure width for left and right sidebars separately. This is LESS code, but simply replacing @left-sidebar-width and @right-sidebar-width with the width you need will make it work for plain CSS as well.

提交回复
热议问题