简体   繁体   English

设备方向元数据

[英]Device orientation metadata

I have designed a website using media-query. 我设计了一个使用media-query的网站。 In the browser it is looking perfect. 在浏览器中看起来很完美。 But when i am checking in the tablet or in mobile device, in portrait mode it is good, 但是,当我在平板电脑或移动设备中签到时,在纵向模式下很好,

but when I am changing the device orientation portrait to landscape then it is not looking perfect. 但是当我将设备方向肖像更改为横向时,它看起来并不完美。 So my doubt is "is there any meta-data to disable the device orientation, so even though user change the device orientation then the content will not rotate." 因此,我的疑问是“是否有任何元数据来禁用设备方向,因此即使用户更改了设备方向,内容也不会旋转。”

thanks, naresh kumar. 谢谢,纳雷什·库马尔。

If i understood you properly, you no need to disable the orientation but rather you can adjust screen elements even when the device is rotated. 如果我对您的理解正确,则无需禁用方向,而是即使设备旋转时也可以调整屏幕元素。 You can use the below queries: 您可以使用以下查询:

@media all and (orientation: portrait) { ... }
@media all and (orientation: landscape) { ... }

Because a good design should fit in all devices and in all orientations perfectly... 因为一个好的设计应该完美地适合所有设备和所有方向...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM