jQuery Mobile背景未满高 [英] jQuery Mobile background not full height

查看:76
本文介绍了jQuery Mobile背景未满高的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在iPhone上加载jQuery Mobile页面时,其中一些页面超出了初始视口.初始视口之外的空间是白色,而不是应该的灰色.我试图使用以下代码行将高度设置为100%:[data-role=page]{height: 100% !important; position:relative !important;},但是仍然不能解决问题.

When I load my jQuery Mobile page on an iphone, some of the page extends out of the initial viewport. The space that is out of the initial viewport to begin with is white, not gray which it should be. I've attempted to set the height to 100% using this line of code: [data-role=page]{height: 100% !important; position:relative !important;} however this still does not do the trick.

推荐答案

首先,请勿滥用!important.要诊断CSS出了什么问题,您可以在Firefox/Chrome浏览器的开发者控制台中使用Firebug. (Safari和IE具有类似的功能).某些CSS可能会被覆盖,或者图层可能会重叠.

First, don't misuse !important. To diagnose what's wrong with the CSS, you can use Firebug in Firefox / Developer Console in Chrome. ( Safari & IE have similar things ). Some CSS may be overridden, or layers maybe overlapped.

没有您的HTML代码和jQuery脚本,对此我无能为力,但通常,要使内容全高,必须将html CSS和body CSS设置为使用height: 100%;.

Without your HTML codes & jQuery scripts, I can't really help on this, but normally, to make the content to full height, you have to set html CSS and body CSS to use height: 100%;.

这篇关于jQuery Mobile背景未满高的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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