简体   繁体   English

是否需要在 html、js 和 css 中添加约束以调整到不同的屏幕尺寸

[英]Do you need to add constraints in html, js, and css for resizing to different screen sizes

I am pretty new to html, js, and css.我对 html、js 和 css 还是很陌生。 I was wondering if just.我想知道是否只是。 like in IOS development where auto layout is needed for different screen sizes and/or orientations if this is the case for developing a website.就像在 IOS 开发中一样,如果这是开发网站的情况,则需要针对不同的屏幕尺寸和/或方向进行自动布局。 I've looked around and seen things like margins and auto, but I'm not sure.我环顾四周,看到了边距和汽车之类的东西,但我不确定。 Is there any specific links or videos one could suggest to understand this concept so that no matter how the screen size is the contents on board will adjust.是否有任何特定的链接或视频可以建议您理解这一概念,以便无论屏幕大小如何,船上的内容都会进行调整。 Thank you.谢谢你。

use media queries like this:使用这样的媒体查询:

@media only screen and (min-width: 1024px) and (max-width: 1025px) and (min-height: 1366px) and (max-height: 1367px) {.header { width: 90%; @media only screen and (min-width: 1024px) and (max-width: 1025px) and (min-height: 1366px) and (max-height: 1367px) {.header { width: 90%; } } } }

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

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