简体   繁体   English

具有偏移量的对话框位置似乎不起作用

[英]dialog position with offset doesn't seem to work

Need help positioning a dialog that I'd like to open in the same spot relative to the viewport itself, not some element on the page. 需要帮助将我想打开的对话框放置在相对于视口本身的同一位置,而不是页面上的某些元素。

I have it opening in the top right of the browser window but I had thought I could use "offset" to move it down a bit. 我在浏览器窗口的右上角打开了它,但是我以为可以使用“偏移”将其向下移动一点。 Offset seems to do nothing and it continues to stick to the upper right corner of the browser window. 偏移似乎无能为力,并且一直停留在浏览器窗口的右上角。 Reading the documentation is not much help. 阅读文档并没有太大帮助。

Here's my script: 这是我的脚本:

jQuery("#dialog-profile-more").dialog( { 
autoOpen: false,
dialogClass: "dialogWithDropShadow",
height: "auto",
width: 300,
position: { my: "right top", 
            at: "right top", 
            of: window, 
            offset: "25 25"  }
} );

thanks in advance. 提前致谢。

Yes, that was the answer: css styling and adding position fixed and some margin to my dialogWithDropShadow class. 是的,这就是答案:css的样式和位置固定不变以及我的dialogWithDropShadow类的边距。 Thanks everyone.... 感谢大家....

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

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