网站布局因设备而异 [英] Website layout differs by device

查看:85
本文介绍了网站布局因设备而异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站布局因设备更改而出现问题。



在我的网站上,布局非常完美,但在移动和旧电脑上,布局会发生变化。 />


我猜这是因为决议。





我当时被告知废除使用填充在我的网站上居中项目,但我仍然遇到同样的问题。



任何人都可以告诉我这个吗?



我的网站是conorpendlebury.com



我尝试了什么:



我尝试更改网站布局,解决方案和添加媒体查询。

Im having some trouble with my website layout changing by device.

On my website the layout is perfect but on mobile and older computers the layout changes.

Im guessing this is due to resolutions.


I was then advised to abolish the use of padding to center items on my site but i am still having the same problem.

Can anyone advise me on this ?

My Website is conorpendlebury.com

What I have tried:

I have tried changing site layout, resolution and adding media queries.

推荐答案

HTML和CSS在过去15年中发生了巨大变化因此,在旧设备/浏览器中,您的代码无法按预期工作,这是有道理的。



那时你需要做出决定。您是否可以放弃使用旧设备的人(因为它们可能与您的目标受众无关)。这需要我们去营销和东西,你必须在其他地方阅读。



您可以随时制作不同的网页布局,1用于标准笔记本电脑/个人电脑, 1用于较旧的笔记本电脑/ pc和另一个用于移动

在您的javascript中,当页面加载时,您可以检查浏览器的名称版本并重定向到最佳版本。



此外,在您知道它们是工作标准之前,请尽量不要立即接受新的HTML标记。有些浏览器会引入非标准的功能。

2值得注意的例子是Internet Explorer,它接受vbscript而不是javascript,因此无法在所有浏览器上运行。

我们还有Internet Explorer在非标准类上引入了AJAX,后来经过调整并成为标准类。
HTML and CSS have evolved dramatically over the last 15 years so it makes sense your code won't work as expected on older devices/browsers.

That's when you need to make decisions. Whether you can let go people with older devices (as they may not correspond to your target audience). This takes us to marketing and stuff, and you'll have to read about that elsewhere.

You can always make different web layouts, 1 for standard laptop/pc, 1 for older laptop/pc and another one for mobile.
In your javascript, when the page is loading, you can check the name-version of the browser and redirect to best version for them.

Also, try not to embrace right away new HTML tags before you know they are a working standard. Some browsers introduce features that are not standard.
2 notable examples are Internet Explorer, which would accept vbscript instead of javascript, thus not working on all browsers.
Also we have Internet Explorer instroducing AJAX on a non-standard class, which was later adapted and became standard.


这篇关于网站布局因设备而异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆