我如何根据屏幕尺寸扩展网站或缩小规模
因此,我制作了一个网站,该网站的图像具有多个文本框,等等,一些用户百分比以及有些使用像素,我的意思是他们现在使用它来在特定的位置。因此,如果您将笔记本电脑连接到电视并放置网站,它将自动扩展完美地扩展,这会使事物有些模糊,但一切都已经到位。我想知道如何为我的网站添加一个函数,该函数选择页面中的所有内容,只是根据屏幕尺寸缩小或扩展它,我不在乎它在收缩或扩展后是否会变得模糊。或者,如果有人对我如何使所有内容都适合页面的所有想法,那么无论屏幕尺寸如何,它都会非常有帮助。
so i made a website that has images multiple textboxes and etc, some user percentage and some use pixels by that i mean they use that to be in the specific place there in right now. So if you connect your laptop to a tv and put the website it will automatically scale up perfectly it just causes the things to be a little blurry but everything is in place. i was wondering how i can add like a function for my website that selects everything in the page and just shrinks it or expands it depending on the screen size, i dont care if it gets blurry after shrinking or expanding. Or if anyone has any other idea on how i can make everything fit to page no matter screen size it would be very helpful.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
首先,有多种方法可以使网站遇到责任心,
最简单的方法是媒体查询:
这也可以应用于不同的样式表:
他们基本上告诉设备用于显示尺寸的样式。
首先,您可以努力:
//www.www.w3schools.coms.coms.comsss/csssss/cssss_rwd_mediaquelies.mediaqueries.asp
https: 更好地理解媒体查询本身。
但!大多数人往往会忘记您还需要调整HTML:
根据您想要支持的设备和旧设备的数量和数量,您还可以添加一个基本替代所有内容的开关:
使用此ENMUS,您可以抓住移动设备,
但是,只有当您真的想支持时,这些事情才会很有趣
历史设备。
First of all, there are multiple ways to make a site responsiv,
the easiest way are the media queries:
This can also be applied to different stylesheets:
They are basicly telling the devices what styles to use for what display size.
For the start you can work through this:
https://www.w3schools.com/css/css_rwd_mediaqueries.asp
to get a better understanding of the media query itself.
But! Most somehow tend to forget that you also need to adjust your html:
Depending on how much devices and how much older devices you want to support you can also add a switch that basicly replaces everything:
With this enormus something you can grab the mobile agents,
but such things are only interesting if you really want to support
historic devices.
也许您可以尝试添加一些CSS
@Media屏幕和(最小宽度:1240px){...}
Maybe you could try to add some css like
@media screen and (min-width: 1240px) {...}
响应能力
这是您可以测试它的方法。只需在浏览器中打开它,请右键单击“检查元素”或F12。我用红色标记,您可以看到它的外观在不同的尺寸上。
Responsive
Here is how you can test it. Just open it in browser, go right click inspect element or f12. I marked with red where you can see that, how it will look on different sizes.