在屏幕上设置弹出窗口大小 [英] Set a popup size against the screen

查看:85
本文介绍了在屏幕上设置弹出窗口大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在其中一个页面中,页面上有一个弹出窗口。目前,我在CCS中定义了弹出窗口的大小(例如,宽度:250px;高度:220px)。它在桌面屏幕上显示正常。但是,当在手机上加载页面时,弹出窗口中的某些项目不会显示。现在,我们考虑如何调整弹出窗口相对于屏幕(包括手机)的大小。非常感谢你能不能告诉我怎么做。

解决方案

这就是: http://www.w3schools.com/js/js_window_screen.asp



但是,最好避免弹出窗口。在许多情况下,它们不方便(最好将其留给用户,创建新窗口,选项卡或导航到同一页面上的现有内容)。此外,由于使用弹出窗口进行了大量广告宣传,许多用户可能会使用Web浏览器的功能或为此目的开发的插件来阻止它们。



-SA

In one of pages, there is a popup on a page. Currently, I defined the size of the popup in CCS (e.g., width: 250px; height: 220px). It displays fine on desktop screen. However, when the page is loaded on a cell phone, some of the items in the popup do not display. Now, we are consider how to size the popup relative to the screen (including cell phone). Greatly appreciate if you can hint me how to do it.

解决方案

This is how: http://www.w3schools.com/js/js_window_screen.asp.

However, it would be better to avoid popups. In many cases, they are inconvenient (it's better to leave it up to the user, to create a new window, a tab or navigate out of existing content on the same page). Also, due to some massive advertizement using pop-ups, many users may block them using Web browsers' features or plug-ins developed for this purpose.

—SA


这篇关于在屏幕上设置弹出窗口大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆