2013-03-07 115 views

回答

3

有3個解決問題的對策。

  1. 如果你可以使用相同的data-theme的內容和頁面容器。不幸的是,它不會好看,因爲仍然會有兩者之間的明顯的區別

  2. 不要使用data-theme在容器但始終只使用它在頁面DIV。仍然不是最佳解決方案。

  3. 調整您的內容的大小,以填充可用空間。使用此方法:

    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; 
    } 
    

瞭解更多關於該解決方案在我的其他ARTICLE(我的個人博客),或發現HERE,尋找章:獲取正確的最大內容高度

+0

真棒,我得到它的工作。謝謝 – User 2013-06-15 18:20:24

0

可以調整UI頁面主題-A的色彩在你的風格/ CSS,所以你不會承認它提供的是不工作

.ui-page-theme-a 
{ 
    background-color: sameAsContent/Footer !important; 
    border-color: sameAsContent/Footer !important; 

} 
+0

即使已經有了答案,線程已經老了,我補充說。因爲這對我來說是一種解決方法,如果你是谷歌的問題,這是第一個鏈接。 – LosKartoflos 2015-09-15 13:57:22

相關問題