在移动设备上进行站点扩展 [英] Site scaling on a mobile device

查看:69
本文介绍了在移动设备上进行站点扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

就移动设备而言,我是一个新手.无论如何,我创建了一个网页(仍在构建中),并在名为govpress的现有wp主题上实现了该网页(是的,我知道这可能不是使事情发生的最实用方法,但凭借我的编码技能,这是最简单的方法).现在,我只是无法使其在移动设备上正常工作.我还没有找到使它像其行为那样的代码.因此,在移动设备上,似乎可以将页面缩放到设备的屏幕宽度分辨率(?).此外,背景和标题div(全角)会缩放到设备屏幕的宽度.即使我缩小它也不会放大bg或标题div.是在某处已编码此行为的主题还是在CSS某处.. !!? Heeeelp,请!!!

Im a total newbie as far as mobile devices are concerned. Anyhow, i created a webpage (still under construction) and implemented it on the existing wp theme called govpress (yes, i know it might not be the most practical way to make things happen but with my coding skills it was the easiest). Now i just cant get it working correctly with mobile devices. I havent found the code that makes it behave as it does. So, on a mobile it seems to scale the page to screen width resolution of the device(?). Also the background and the header div (full width) scales to device screen width. And even if i zoom out it doesnt enlarge the bg nor the header div. Is it the theme that has this behavior somewhere coded or is it somewhere in the css..!? Heeeelp, please!!!

http://www.lifespectrum.eu 上找到网站. 这是我的CSS: http://lifespectrum.eu/wp-content/themes/govpress/style.css (虽然有很多th击声) 请询问您是否还需要其他任何东西! 预先感谢!

Find the site on http://www.lifespectrum.eu And heres my css: http://lifespectrum.eu/wp-content/themes/govpress/style.css (lots of thrash there though) Please ask if you need anything else! Thanks in advance!

推荐答案

缩放是通过媒体查询在css文件中完成的.相应地调整这些语句,以使背景/标题做您想要的事情:

The scaling is done in the css file via media queries. Adjust these statements accordingly to make the background/header do what you want:

@media screen and (max-width: 840px)
@media screen and (max-device-width: 680px)
@media screen and (max-width: 480px)

这篇关于在移动设备上进行站点扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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