简体   繁体   English

更改jQuery对话窗口位置

[英]Change jQuery Dialog Window Position

I'm using the Dialog from jQuery, http://jqueryui.com/dialog/#modal-message It works perfectly fine, I just can't seem to move the dialog window's position. 我正在使用jQuery的Dialog, http://jqueryui.com/dialog/#modal-message它工作得很好,我似乎无法移动对话窗口的位置。

How do I achieve this? 我该如何实现这一目标? I've tried looking for the code in it's CSS, tried inspecting the element and everything, it just won't budge. 我已经尝试在它的CSS中寻找代码,尝试检查元素和所有内容,它只是不会让步。

What am I doing wrong? 我究竟做错了什么? Where do I actually modify it? 我在哪里实际修改它?

You can set the position by setting the Position 您可以通过设置位置来设置Position

as

See DEMO DEMO

You can set the "position" setting when constructing it: 您可以在构建时设置“位置”设置:

http://api.jqueryui.com/dialog/#option-position http://api.jqueryui.com/dialog/#option-position

if you want to drag this pop-up, just define 如果你想拖动这个弹出窗口,只需定义

draggable: true,

if want to change position of pop-up just define vertical and horizontal position in 如果想改变弹出的位置,只需定义垂直和水平位置即可

position: ['center', 'top']

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM