Listing 10. The viewport test code.
清单10.viewport测试代码。
Layout with a wide browser viewport.
宽浏览器窗口中的布局。
Layout with a narrow browser viewport.
窄浏览器窗口中的布局。
More info on viewport, check out the following documentation.
要想了解更多viewport信息,请查阅以下文档。
The viewport tag changes the logical view size when displaying a page.
显示页面时视窗标签修改逻辑视图大小。
By default, the browser USES a viewport, or logical dimension, of 980 pixels wide.
默认地,浏览器使用980像素宽的视见区或逻辑尺寸。
The viewport meta tag is not a standard yet, but it is a widely accepted convention.
viewport元标签并不是标准,不过它是个广泛认可的惯例。
You can use a special meta-tag to specify the properties of the Mobile Safari viewport.
您可以使用特殊的meta 标记来指定MobileSafari视窗的属性。
The two displays differ in what they show when the site is larger than the iPhone viewport.
当站点比 iPhone 视窗大时,这两个显示界面在显示内容时会有所不同。
You don't want ThickBox to cover the entire window, let alone extend beyond the edges of the viewport.
您不想让ThickBox覆盖整个窗口,更不想让它延伸到视区以外。
To get that to work, the graphics environment needs to know the start and end coordinates of the viewport.
要让这成为可能,这个图形环境就需要知道viewport的起点和终点。
The GMap2 class draws the map and responds appropriately to scrolling and zooming events in the viewport.
GMap2类可以绘制地图并负责视图端口中的滚动和缩放事件。
Now the constructor takes four additional parameters, which are the starting and ending points of the viewport.
现在这个构造函数可以利用另外4个参数了,它们分别是viewport的起点和终点。
A viewport is an artificial coordinate system that is translated into the physical coordinate system of the image.
viewport是一个人造的坐标系统,可以转换成图像的物理坐标系统。
Since our Web page layout is fluid, a user can resize the browser viewport to create a more useful presentation.
因为我们的Web页面布局是流式的,用户可以改变浏览器窗口的大小来形成更合适的显示方式。
The tx and ty functions use these new viewport coordinates to translate viewport coordinates into physical coordinates.
tx和ty函数使用新的viewport坐标,并将viewport坐标转换成物理坐标。
The BoxObject handles the viewport translation in the render method and calls the draw method with the physical coordinates.
BoxObject在render方法中实现viewport的转换,并使用物理坐标来调用draw方法。
The viewport settings I chose for this application set the width of the page to the width of the device's current orientation.
我为该应用程序所选的视窗设置将把页面的宽度设为设备当前方位的宽度。
Besides just the viewport, make sure that your webpages are flexible; for example, use dynamic widths, instead of static widths.
除了仅仅viewport以外,还应该确保你的网页的灵活性:例如,使用动态宽度而非静态宽度。
This way, the Line, Oval, and Rectangle classes can all work with viewport coordinates without having to worry about the translation.
使用这种方法,Line、Oval和rectangle类都可以利用viewport坐标,而不需要担心坐标转换的问题。
One feature I would like to add that would be generally useful, but critical for smartphone support is viewport and/or scaling support.
我想增加的一个非常有用的特性是视角与缩放支持,这对于智能手机来说也非常关键。
Some content on the IBC Web site has the potential of being quite wide, so we wanted to use as much of the browsers viewport as possible.
IBCWeb站点上的某些内容可能相当宽,所以我们希望尽可能利用浏览器窗口的宽度。
Next, we exerted control over the user's experience by controlling how the page is seen on the device through the use of the viewport metatag.
接下来,我们将实施更多的控制,即通过使用viewportmetatag控制页面如何在设备上被查看。
The dimensions of the #header ID class are now in line with the iPhone viewport, and I manually changed the background image to fit in the space.
headerID类的尺寸现在符合iPhone视窗的大小,并且我手动更改了背景图片以适应空间大小。
You'll also be using the iPhone development plug-in, which provides a mock iPhone screen for you to preview your development in an iPhone-size viewport.
您还将使用iPhone开发插件,该插件将为您提供一个模拟的 iPhone屏幕以在 iPhone 大小的视窗中预览开发。
Because we chose to float the sidebar, there comes a point when the sidebar will flip under the main content area when the width of the viewport is too narrow.
因为我们选择让边栏浮动,所以当浏览器窗口的宽度太窄时,边栏会出现在主内容区域下面。
The viewport metatag also supports minimum scale and maximum scale, which can be used to constrain just how much control a user has over the rendering of the page.
viewportmetatag还支持最小和最大伸缩,可用来限制用户对呈现页面的控制力。
As shown in Figure 2, Figure 3, Figure 4, and Figure 5, changes in font size and viewport width can have potentially dramatic effects on visual elements placed on the page.
如图2、图3、图4和图5所示,字体大小和浏览器窗口宽度的改变会对页面上的可视元素产生显著影响。
This is very useful when a user needs to see more content within the browser viewport by decreasing the font size or to make a Web page more legible by increasing the font size.
这非常有用,用户可以减小字体大小以便在浏览器窗口中看到更多的内容,或者增加字体大小以使Web页面更容易辨认。
Never fear, though. With a simple meta tag that only the iPhone pays attention to, you can "right-size" the Web page: A viewport tag allows you to supply hints to the mobile Safari browser.
但是不用担心,使用一个简单的只有iPhone 才能识别的meta标记,就可以将网页校正到 “正确的尺寸” 了:viewport 标记允许为移动Safari浏览器添加提示。
应用推荐