使 Flex 适合用户的屏幕.. 无论屏幕尺寸如何 [英] Make Flex Fit the Users' Screen.. No matter what screen size
问题描述
制作 Flex 应用程序.只是想知道是否有人创建了自动适合用户屏幕尺寸的东西,我是如何做到这一点的?
Making an Flex App. Just wondering if anyone has created something that fits automatically to the users' screen size and how I go about doing this?
其中一个原则是我需要一个背景图像,这显然必须缩放/调整大小以匹配用户屏幕.
One of the principle things is that I need an background image, which is obviously going to have to scale / resize to match the users screen.
谢谢
推荐答案
例如,您可以为应用程序使用百分比值.如果应用程序的大小发生变化,还会调度调整大小事件.你可以听它做出反应.
you can use percentage values for the application for example. There is also a resize-event dispatched if the size of the application changes. You can listen to it to react.
如果您想根据屏幕大小调整文本大小,据我所知没有智能解决方案,因为 fontSize 只接受像素值(没有 em、% 等)
If you want to resize text regarding to the screen size, there is no smart solution as far as I know because fontSize only accepts pixel values (no em, %, etc.)
这篇关于使 Flex 适合用户的屏幕.. 无论屏幕尺寸如何的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!