PhoneGap中文网

 找回密码
 立即注册
PhoneGap中文网 视频教程 ionic 教程 查看内容

ionic .col-offset-{width-percent} : 指定列偏移

2015-4-12 14:06| 发布者: admin| 查看: 4456| 评论: 0

摘要: .col-offset-{width-percent} : 指定列偏移列可以从默认位置偏移,ionic预置了一些CSS类供我们快速设置列偏移:.col-offset-10 - 偏移默认位置10%容器宽度.col-offset-20 - 偏移默认位置20%容器宽度.col-offset-25 - ...
.col-offset-{width-percent} : 指定列偏移

列可以从默认位置偏移,ionic预置了一些CSS类供我们快速设置列偏移:

  • .col-offset-10 - 偏移默认位置10%容器宽度
  • .col-offset-20 - 偏移默认位置20%容器宽度
  • .col-offset-25 - 偏移默认位置25%容器宽度
  • .col-offset-33 - 偏移默认位置33%容器宽度
  • .col-offset-50 - 偏移默认位置50%容器宽度
  • .col-offset-67 - 偏移默认位置67%容器宽度
  • .col-offset-75 - 偏移默认位置75%容器宽度
  • .col-offset-80 - 偏移默认位置80%容器宽度
  • .col-offset-90 - 偏移默认位置90%容器宽度

这实际上是通过设置子元素的margin-left样式实现的,所以如果你需要让它 偏移正常位置78%,可以这样:

  1. .col-offset-78{
  2. margin-left:78%;
  3. }


<!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">
  <h1 class="title">指定列偏移</h1>
 </div>
 <div class="scroll-content has-header">
  <div class="row">
   <div class="col col-33 col-offset-33">.col</div>
   <div class="col">.col</div>
  </div>

  <div class="row">
   <div class="col col-33">.col</div>
   <div class="col col-33 col-offset-33">.col</div>
  </div>

  <div class="row">
   <div class="col col-33 col-offset-67">.col</div>
  </div>
 </div>
</body>
</html>


头晕

难过

扯淡

不解

搞笑

支持

超赞
1

欠扁

刚表态过的朋友 (1 人)

相关阅读

最新评论

关闭

站长推荐 上一条 /1 下一条

ionic4视频教程

Archiver|手机版|小黑屋| PhoneGap中文网 ( 京ICP备13027796号-1 )  

GMT+8, 2024-3-29 21:34 , Processed in 0.031380 second(s), 22 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

返回顶部