Ionic基础教程

Hello Ionic

前言

我们从第一个程序“Hello Ionic”开始了解如何使用 Ionic

准备工作

点击这里下载 最新版本,将下载的文件解压。

打开解压后的 release 文件夹,将文件夹中的 js、css、fonts 文件夹复制到你自己的项目中。

Hello Ionic

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width" />
<title>Hello Ionic</title>
<!-- 引入了下载的包中的 ionic.css -->
<link href="css/ionic.css" rel="stylesheet" />
</head>
<body>
<div class="bar bar-header bar-positive">
<h1 class="title">头部</h1>
</div>
<div class="scroll-content has-header has-footer">
<div>主体内容</div>
</div>
<div class="bar bar-footer bar-balanced">
<div class="title">底部</div>
</div>
</body>
</html>

编辑好后,在浏览器中查看:

最后,来个广告

若你觉得此文不错,请分享,若认为尚需改进,请点讚。

结束语