2

当页面在应用程序中加载时,框架库和 CSS 需要几秒钟才能加载,并且我得到一个明显的 blip。如何防止这种情况发生?

我曾在运行 os 版本 2.2 的 Android 虚拟设备上尝试过。我还在运行 os 版本 4.1 的实际设备上尝试过它。

.html 文件:

<!DOCTYPE HTML>
<html>
        <head>
            <meta charset="UTF-8">
            <title>Accordfintech</title>
<meta name="viewport"
    content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="shortcut icon" href="images/favicon.png">
            <link rel="apple-touch-icon" href="images/apple-touch-icon.png">
            <link rel="stylesheet" href="css/Accordfintech.css">
            <script>window.$ = window.jQuery = WLJQ;</script>
            <script type="text/javascript" src="dojox/mobile/deviceTheme.js"></script>
            <script type="text/javascript" data-dojo-config="isDebug: false, async: true, parseOnLoad: true, mblHideAddressBar: false" src="dojo/dojo.js"></script>
            <style>
            .col_M{margin:5px 7px 0 7px;}
            </style>
        </head>
        
        <body id="content" style="display: none;">
        <div data-dojo-type="dojox.mobile.Heading"
            data-dojo-props="label:'Accord Fintech'" style="background-color: #10537b; color: black">
        <img src="images/Accord.png" align="left" style="margin: 8px 0px 0px 8px">
        </div>
        <div data-dojo-type="dojox.mobile.ScrollableView" id="view0" data-dojo-props="selected:true">
        <div data-dojo-type="dojox.mobile.RoundRectList">
            <div data-dojo-type="dojox.mobile.ListItem"
                data-dojo-props="label:'About Us',moveTo:'abview',transition:'flip',dir:'-1'" style="background-color: #00bcf2" icon="images/about_us.png"></div>
            <div data-dojo-type="dojox.mobile.ListItem"
                data-dojo-props="label:'Software',moveTo:'swview',transition:'flip',dir:'-1'" style="background-color: #00bcf2" icon="images/software_icon.png"></div>
            <div data-dojo-type="dojox.mobile.ListItem"
                data-dojo-props="label:'Database',moveTo:'dbview',transition:'flip',dir:'1'" style="background-color: #00bcf2" icon="images/Database_icon.png"></div>
            <div data-dojo-type="dojox.mobile.ListItem"
                data-dojo-props="label:'Products',moveTo:'prview',transition:'flip',dir:'1'" style="background-color: #00bcf2" icon="images/products_icon.png"></div>
            <div data-dojo-type="dojox.mobile.ListItem"
                data-dojo-props="label:'Research',moveTo:'resview',transition:'flip',dir:'-1'" style="background-color: #00bcf2" icon="images/Research_icon.png"></div>
            <div data-dojo-type="dojox.mobile.ListItem"
                data-dojo-props="label:'Contact Us',moveTo:'cuview',transition:'flip',dir:'-1'" style="background-color: #00bcf2" icon="images/Contact_us.png"></div>
        </div>
    </div>
    <div data-dojo-type="dojox.mobile.ScrollableView" id="abview">
        <div data-dojo-type="dojox.mobile.Heading" fixed="top"
            data-dojo-props="label:'About Us',back:'Menu',moveTo:'view0',transition:'slide'" style="background-color: #10537b"></div>
        <div data-dojo-type="dojox.mobile.ContentPane" class="col_M">
        <p><strong>Accord Fintech Pvt. Ltd.</strong> is an ISO 9001:2008 certified company, set up by a team of professionals with competencies in Financial content, software development and database design using a variety of platforms, technologies and financial domain knowledge.</p>
        </div>
    </div>
    <div data-dojo-type="dojox.mobile.ScrollableView" id="swview">
        <div data-dojo-type="dojox.mobile.Heading" fixed="top"
            data-dojo-props="label:'Software',back:'Menu',moveTo:'view0',transition:'slide'" style="background-color: #10537b"></div>
        <div data-dojo-type="dojox.mobile.ContentPane" class="col_M">
        <p>We can offer you a typically 'made - to - order' solution, based on your requirements.</p>
        <p>We are well versed with website development, intranet and extranet solutions.</p>
        </div>
    </div>
    <div data-dojo-type="dojox.mobile.ScrollableView" id="dbview">
        <div data-dojo-type="dojox.mobile.Heading" fixed="top"
            data-dojo-props="label:'Database',back:'Menu',moveTo:'view0',transition:'slide'" style="background-color: #10537b"></div>
        <div data-dojo-type="dojox.mobile.ContentPane" class="col_M">
        <p>The Database of Accord Fintech is the absolute solution for all financial analysis requirements, comprising listed companies traded on India's major stock exchanges.</p>
        </div>
    </div>

    
    <div data-dojo-type="dojox.mobile.ScrollableView" id="prview">
        <div data-dojo-type="dojox.mobile.Heading" fixed="top"
            data-dojo-props="label:'Products',back:'Menu',moveTo:'view0',transition:'slide'" style="background-color: #10537b"></div>
        <div data-dojo-type="dojox.mobile.ContentPane" class="col_M">
        <p><strong>ACCORD</strong> offers a wide range of products and solutions designed specially for enterprises and small businesses across a variety of industries. 
        </div>
    </div>
    <div data-dojo-type="dojox.mobile.ScrollableView" id="resview">
        <div data-dojo-type="dojox.mobile.Heading" fixed="top"
            data-dojo-props="label:'Research',back:'Menu',moveTo:'view0',transition:'slide'" style="background-color: #10537b"></div>
        <div data-dojo-type="dojox.mobile.ContentPane" class="col_M">
        <p>We are a professionally managed growing research house providing intelligence on every aspect of Indian business, finance and markets.</p>
        </div>
    </div>
    <div data-dojo-type="dojox.mobile.ScrollableView" id="cuview">
        <div data-dojo-type="dojox.mobile.Heading" fixed="top"
            data-dojo-props="label:'Contact Us',back:'Menu',moveTo:'view0',transition:'slide'" style="background-color: #10537b"></div>
        <div data-dojo-type="dojox.mobile.ContentPane" class="col_M">
        <p><strong>Customer Support contacts:</strong></p><br/>
        </div>
        </div>
            <script src="js/initOptions.js"></script>
            <script src="js/Accordfintech.js"></script>
            <script src="js/messages.js"></script>
        </body>
</html>

快照:

启动画面后,它显示内部内容:

在此处输入图像描述

完全加载包和 css 文件后:

在此处输入图像描述

然而,这只会发生几秒钟,但我怎样才能避免这种情况呢?

4

1 回答 1

3

您是否在身体元素上放置了“可见性:隐藏”?您需要放置它(并删除某些工作灯版本正在添加的“display: none”),Dojo Mobile 将确保在准备好显示屏幕时将其删除。

于 2013-07-18T10:59:30.083 回答