Can I fix the width and the height of jQueryMobile dialog?

前端 未结 5 499
感动是毒
感动是毒 2020-12-19 05:48

Can I fix the width and the height of jQueryMobile dialog? Currently, the size of width is 100% which is really awful in iPad.

5条回答
  •  没有蜡笔的小新
    2020-12-19 06:19

    I'm not sure if this has changed recently; but I thought I would offer an answer for jQuery Mobile 1.1.

    To fix the width all dialogs, you need to add the following CSS rule:

    .ui-dialog-contain { 
        max-width: 600px;
    }
    

    If you don't want to apply this setting gobally, you can target an individual page/dialog with it's id, eg:

    #my-dialog .ui-dialog-contain { 
        max-width: 600px;
    }
    

提交回复
热议问题