移动App开发日志开发实例

简单的移动端App开发案例,持续更新。。。

案例是在HBuilder中开发完成的,因为能够方便的一边编写一边及时查看显示结果,而且编写完成后的打包也是简便(可以通过编写web移动app便捷的云打包为apk文件上传实机测试)。

——然后,案例比较简单,是我作为初学者学习的案例,见笑。。。

第一天 实现简单的基本界面

界面设计(ps:因为初学者的缘故,所以没有想太过复杂的界面规划)

将页面分为三个div块,分别为Top\Content\Footer,作为标题,内容,底部标签区块。

Content内容块可以滚动,但Top和Footer区块不受滚动条影响。

Footer底部区块平分三块嵌入类似于button的标签。

代码:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title></title>
    <script type="text/javascript">
    	
   		document.addEventListener('plusready', function(){
   			//console.log("所有plus api都应该在此事件发生后调用,否则会出现plus is undefined。"
   			
   		});
   		
    </script>
    
    <style>
    body{
    margin: 0px;
    padding: 0px;
    }
    
    	.body{
    	border:1px solid #000;
    	position: absolute;
    	height:100%;
    	width: 100%;

    	}
    	
    	/*头部*/
    	.top{
    	height: 10%;
    	width: 100%;
    	position: fixed;
    	background-color: #084981;
    	top: 0px;
    	}
    	
    	/*内容*/
    	.content{
    	position: relative;
    	height: 75%;
    	margin-top: 10%;
    	}
    	
    	/*底部*/ 
    	.foot{
    	position: fixed;
    	height: 15%;
    	width: 100%;
    	background-color: #084981;
    	bottom: 0px;
    	
    	}
    	
    	
    	/*标签图片*/
    	.pic{
    	width: 100%;
    	height: 70%;
    	height: auto;
    	width: 33.3%;
    	}
    	
    	
    	/*底部三分区块*/
    	.cell{
    	float: left;
    	height: 100%;
    	width: 33.3%;
    	text-align: center;
    	}
    	/*第一块*/
    	.cell-1{
    	height: 80%;
    	}
    	/*第二块*/
    	.cell-2{
    	height: 80%;
    	}
    	/*第三块*/
    	.cell-3{
    	height: 80%;
    	}
    	
    	
    	/*Top中的标题字*/
    	.top-title1{
    		height: 70%;
    		font-size: 40px;
    		color: #fff;
    	}
    	.top-title2{
    		height: 30%;
    		font-size: 12px;
    		color: #fff;
    	}
    	/*底部标签字体*/
    	.foot-font{
    		height: 20%;
    		color: #FFFFFF;
    	}
    	
    </style>
</head>
<body>
	<!--外部div-->
	<div class="body">
		
		<!--头部-->
		<div class="top">
		<div class="
  • 4
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值