我是新来的^^你能帮助我吗?
我开发了一个非常简单的phonegap代码应用程序。
- 第一步:我在cmd中写了这两行:
phonegap create Test
bower install bootstrap
(这会增加bootstrap和jquery)。
- 第二步:我编辑了index.html,index.js的内容,我写了:
window.onload = function() {blink()};
function blink() {
$("#logo").fadeOut(500);
$("#logo").fadeIn(500);
$("#logo").fadeOut(500);
$("#logo").fadeIn(500);
window.setTimeout(link,2050);
}
function link(){
window.open("../www/otherpage.html","_self");
}
<!DOCTYPE html>
<html lang="en">
<head>
<title>Test</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="bower_components\bootstrap\dist\css\bootstrap.min.css">
<script src="bower_components\jquery\dist\jquery.min.js"></script>
<script src="bower_components\bootstrap\dist\js\bootstrap.min.js"></script>
<script src="/www/js/index.js"></script>
<style>
body {
font: 20px sans-serif;
line-height: 1.8;
color: #f5f6f7;
background-color: #0068ff;
}
p {font-size: 16px;}
.margin {margin-bottom: 40px;}
.bg-1 {
background-color: #0068ff;
color: #FFFFFF;
}
</style>
</head>
<body>
<!-- First Container -->
<div class="container-fluid bg-1 text-center">
<center><h1>This is a Title<br>Hello!</h1><div id="logo">Blinking message</div></center>
</div>
</body>
</html>
phonegap build android