如何在 HTML 中将模态框定位到浏览器之外?

发布于 2024-09-25 21:03:54 字数 95 浏览 1 评论 0原文

我想将模式框(位置:绝对)定位到浏览器之外,但我无法让它工作。

将模态框放置在辅助监视器上会很酷(当然,如果用户有的话)。

嘿,这让我很沮丧:/

I want to position a modal box (position: absolute) out of browser, but I can't get it work.

It would be cool to position modal box on secondary monitor (if user has one, of course).

Hey, this one keeps me frustrating :/

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甩你一脸翔 2024-10-02 21:03:54

你不能这样做。在浏览器窗口区域之外显示内容的唯一方法是使用 Javascript window.open() 方法,但请注意,此方法可能会被用户的弹出窗口阻止程序阻止,除非它是由用户操作触发的(例如单击关联)。

You can't do this. Just about the only way to display content outside of the browser window area is with the Javascript window.open() method, though note that this method will probably be blocked by the user's popup blocker unless it's triggered by a user action (like clicking a link).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文