ionic中 .col : 默认的定宽列

 

 

 

 

.col : 默认的定宽列
在ionic的栅格中,每一行的各列默认是等宽的,这使得实现一个图片 浏览界面非常简单。下图是instagram app的截图:
instagram


<!DOCTYPE html>
<html>
<head>
 <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no,width=device-width,height=device-height">
 <link rel="stylesheet" type="text/css" href="ionic.min.css">
</head>
<body>
 <div class="bar bar-header bar-positive">
  <h1 class="title">POPULAR</h1>
  <a class="button icon ion-refresh"></a>
 </div>
 <div class="scroll-content has-header">
  <div class="row">
   <div class="col"><img src="img/g-1.jpg"></div>
   <div class="col"><img src="img/g-2.jpg"></div>
   <div class="col"><img src="img/g-3.jpg"></div>
   <div class="col"><img src="img/g-4.jpg"></div>
  </div>
  <div class="row">
   <div class="col"><img src="img/g-5.jpg"></div>
   <div class="col"><img src="img/g-6.jpg"></div>
   <div class="col"><img src="img/g-7.jpg"></div>
   <div class="col"><img src="img/g-8.jpg"></div>
  </div>
  <div class="row">
   <div class="col"><img src="img/g-9.jpg"></div>
   <div class="col"><img src="img/g-10.jpg"></div>
   <div class="col"><img src="img/g-11.jpg"></div>
   <div class="col"><img src="img/g-12.jpg"></div>
  </div>
  <div class="row">
   <div class="col"><img src="img/g-13.jpg"></div>
   <div class="col"><img src="img/g-14.jpg"></div>
   <div class="col"><img src="img/g-15.jpg"></div>
   <div class="col"><img src="img/g-16.jpg"></div>
  </div>
 </div>
 <div class="tabs tabs-dark tabs-icon-only">
  <a class="tab-item"><i class="icon ion-home"></i></a>
  <a class="tab-item active"><i class="icon ion-star"></i></a>
  <a class="tab-item"><i class="icon ion-camera"></i></a>
  <a class="tab-item"><i class="icon ion-chatbubble"></i></a>
  <a class="tab-item"><i class="icon ion-document"></i></a>
 </div>
</body>
</html>

  

 

posted @ 2016-01-20 17:26  wikiki  阅读(507)  评论(0编辑  收藏  举报