我想增加模態消息的寬度和高度。查找模態消息的寬度和高度
請在這裏找到消息示例。
http://jqueryui.com/dialog/#modal-message
誰能幫我找到寬度和高度的位置?
感謝
我想增加模態消息的寬度和高度。查找模態消息的寬度和高度
請在這裏找到消息示例。
http://jqueryui.com/dialog/#modal-message
誰能幫我找到寬度和高度的位置?
感謝
有width
和height
選項:http://api.jqueryui.com/dialog/
.dialog({
width: 420,
height: 200,
...
});
可以initally從例如設置寬度和高度在這裏documentation
上面你可以做到這一點,以獲得寬度和模態的高度
$(".demo-frame").contents().find(".ui-dialog").width();
$(".demo-frame").contents().find(".ui-dialog").height();
您必須小心,因爲模型位於iframe中。 因爲這個原因,你應該使用$(".demo-frame").contents()
接取模態 你也可以通過改變寬度和高度,傳遞你想要的大小:
$(".demo-frame").contents().find(".ui-dialog").width("100px");
$(".demo-frame").contents().find(".ui-dialog").height("100px");
可以初始化高度或指定寬度選項對話框:
$(".selector").dialog({ height: 400 });
此外,您還可以在初始化後設置高度或寬度選項:
$(".selector").dialog("option", "height", 400);
看一看在[API DOCUME ntation](http://api.jqueryui.com/dialog/) – crush 2014-09-03 13:39:05