0
我正在jquery移动应用上工作,在那里我想显示所有设备的启动画面,包括ipod,iphone,android手机,网页浏览器。如何在jquery mobile中显示所有移动设备和网页浏览器的启动画面
我曾尝试下面的代码:
1)
<script type="text/javascript">
(function() {
var a; if (navigator.platform === "iPad") {
a = window.orientation === 90 || window.orientation === -90 ?
"_Startup_748x1024.png" : "Startup_768x1004.png"
} else {
a = window.devicePixelRatio === 2 ?
"Startup_640x920.png" : "Startup_320x460.png"
}
document.write('<link rel="apple-touch-startup-image" href="' + a + '"/>') })()
上面的代码不与Android手机和网络浏览器的工作。
2.)
<div data-role="page" id="splash">
@Html.Partial("_MobileHeader")
<div class="splash">
<img src="images/_Startup_748x1024.png" alt="startup image" style="width: 100%; height: 100%" />
</div>
<div data-role="content" id="pagecontent" data-theme="c">
@RenderBody()
</div>
<!--End content div -->
@Html.Partial("_MobileFooter")
</div>
and the script that i have used is :
$(document).on('pageinit','#splash',function(){
setTimeout(function(){
$.mobile.changePage("#pagecontent", "fade");
}, 4000); });
与DIV的上述两个代码得到一起显示我想先只显示初始屏幕另一个div的内容。
请建议我解决上述问题的任何帮助,将不胜感激。
在此先感谢。
你想让这种情况发生在所有设备上,包括桌面? – Charlie
嗨查理, 是的,我希望这可以在所有设备上工作,包括桌面。 – Kriitika
这些启动画面图像可以灵活吗?我的意思是说,它们中的文本和图像可以制作成HTML和CSS而不是图像? – Charlie