
viewport
词源
复合词,源自view(观看)+ port(端口),1960年代首次用于计算机图形学领域。
noun
❶ 视口,指在网页或图形界面中用户可见的区域,常用于响应式设计调整不同设备的显示范围。
“The website adjusts its layout based on the viewport size.”
(该网站根据视口大小调整布局。)
“Mobile devices have smaller viewports than desktop screens.”
(移动设备的视口比桌面屏幕小。)
❶ 在3D图形或游戏中,指虚拟摄像机可见的渲染范围,决定玩家能看到的场景部分。
“The game character's viewport shows only a portion of the map.”
(游戏角色的视口仅显示地图的一部分。)
“Adjust the viewport angle to see more of the 3D model.”
(调整视口角度以查看更多3D模型细节。)
常见短语
viewport meta tag — HTML中用于控制移动端页面缩放和布局的元标签,典型写法为 <meta name='viewport'>。
“Add 'width=device-width' to the viewport meta tag for mobile optimization.”
(在视口元标签中添加'width=device-width'以优化移动端显示。)
viewport width — 视口宽度,通常以CSS像素为单位,影响媒体查询断点和布局计算。
“Use 'vw' units to size elements relative to the viewport width.”
(使用'vw'单位设置相对于视口宽度的元素尺寸。)