Jquery mobile 使用jQuery mobile删除内容和页脚之间的空白:移动应用程序
我正在使用jQuery mobile开发一个移动应用程序,在内容和页脚之间有一个空白。如何关闭此空间Jquery mobile 使用jQuery mobile删除内容和页脚之间的空白:移动应用程序,jquery-mobile,Jquery Mobile,我正在使用jQuery mobile开发一个移动应用程序,在内容和页脚之间有一个空白。如何关闭此空间 这个问题有三种解决方案 如果可以对内容和页面容器使用相同的数据主题。不幸的是,这看起来并不好看,因为两者之间仍然存在明显的差异 不要在容器上使用数据主题,但始终只在页面div上使用。这仍然不是最佳解决方案 调整内容大小,使其填满可用空间。使用此方法: function getRealContentHeight() { var header = $.mobile.activePage.fi
这个问题有三种解决方案
数据主题
。不幸的是,这看起来并不好看,因为两者之间仍然存在明显的差异数据主题
,但始终只在页面div上使用。这仍然不是最佳解决方案function getRealContentHeight() {
var header = $.mobile.activePage.find("div[data-role='header']:visible");
var footer = $.mobile.activePage.find("div[data-role='footer']:visible");
var content = $.mobile.activePage.find("div[data-role='content']:visible:visible");
var viewport_height = $(window).height();
var content_height = viewport_height - header.outerHeight() - footer.outerHeight();
if((content.outerHeight() - header.outerHeight() - footer.outerHeight()) <= viewport_height) {
content_height -= (content.outerHeight() - content.height());
}
return content_height;
}
函数getRealContentHeight(){
var header=$.mobile.activePage.find(“div[data role='header']:可见”);
var footer=$.mobile.activePage.find(“div[data role='footer']:visible”);
var content=$.mobile.activePage.find(“div[data role='content']:visible:visible”);
var viewport_height=$(窗口).height();
var content_height=viewport_height-header.outerHeight()-footer.outerHeight();
如果((content.outerHeight()-header.outerHeight()-footer.outerHeight())您可以在样式/css中调整ui-page-theme-a的颜色,以便您无法识别它
.ui-page-theme-a
{
background-color: sameAsContent/Footer !important;
border-color: sameAsContent/Footer !important;
}
提供的链接不起作用。即使有allready给出的答案,而且线程是旧的,我也添加了此链接。因为这是我的一个解决方法,如果你用谷歌搜索问题,这是第一个链接。