Blazor Server在移动设备上不缩放(缩放)

发布于 2025-01-27 18:38:33 字数 559 浏览 4 评论 0原文

我在Blazor Server中制作了一个小型传感器应用程序。

但是,当我在手机上查看该应用程序时,它显示了这些滚动条(我总是需要捏/缩放我的页面以使滚动条消失并像应有的那样显示应用程序)。 看起来,当我重新加载时,该应用程序始终都会放大,即使我在_hosts file(< meta name =“ viewport” content =“ width =” width =“ width =” width =“ width =”宽度,初始尺度= 1.0“>)。 不知道这是否是相关信息,但是我也在前端使用 mudblazor

由于我的一半仪表板看不见,因此该应用程序无法使用和不愉快。

对问题可能是什么想法? 谢谢。

I made a small sensor application in Blazor server.

However, when I view the app on my phone, it shows these scrolling bars (I always need to pinch/zoom out my page to make the scrolling bars disappear and show the app like it should).
It looks like the app is zoomed in at all times when I reload, even tho I set the viewport in _hosts file (<meta name="viewport" content="width=device-width, initial-scale=1.0">).
Do not know if this is relevant information, but I'm also using MudBlazor in the frontend.

It makes the app unusable and unpleasant to consult because half of my dashboard is not visible.

Any ideas to what the problem could be?
Thanks.

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

千笙结 2025-02-03 18:38:33

您正在使用哪个框架都没关系。归根结底,所有这些都以内联样式或CSS规则呈现。如果您想让窗户收缩一些东西,则该项目或其中一个父母需要与窗户相关的大小。

默认情况下,Blazor内置了Bootstrap,它具有一个很好的网格系统,您可以用于缩放。我不使用第三方插件,但是正如@mehmet所说,您应该做的第一件事是Google或检查YouTube的有关如何在Mudblazor中格式化项目的教程。

尝试: https://www.youtube.com/Results? /a>

It doesn't matter what framework you're using. At the end of the day, it all renders with either inline styles or CSS rules. If you want something to shrink with the window, then either the item or one of its parents needs its size to be set in relation to the window.

By default, Blazor has Bootstrap built in, which has a pretty good grid system that you can use for scaling. I don't use third party plugins, but as @Mehmet says, the first thing you should do is either Google or check YouTube for tutorials on how to format items in MudBlazor.

Try: https://www.youtube.com/results?search_query=mudblazor+layout

忆依然 2025-02-03 18:38:33

您应该将容器包裹在布局容器中,例如泥舱,泥扇或泥块。这些组件可以帮助您使用没有或小CSS的响应式设计。

You should wrap your container inside a layout container like MudContainer, MudStack or MudGrid. These components helps you with the responsive design with no or little CSS.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文