【发布时间】:2015-09-03 03:02:54
【问题描述】:
我想做这样的东西:
你可以看到左边的一个大网格是右边两个网格的两倍(一个在另一个之上):
这是我的 html 方法:
<div class="content">
<h1>SEGUROS</h1>
</div>
<section>
<section class="taller-row">
<div class="row">
<div class="col standard-grid tall-grid">
<img src="../img/ionic.png" class="img"/>
<p>INFORMACIÓN<br> OTROS SEGUROS</p>
</div>
</div>
</section>
<section class="two-rows-in-one-column">
<div class="row">
<div class="col standard-grid right-cells">
<img src="../img/ionic.png" class="img"/>
<p>Dudas seguros de vida</p>
</div>
</div>
<div class="row">
<div class="col standard-grid">
<img src="../img/ionic.png" class="img"/>
<p>Dudas seguros exequias</p>
</div>
</div>
</section>
</section>
我的 css/sass 看起来像这样:
#dashboard .col.standard-grid{
width: 100%;
height: 0;
padding-bottom: 38%;
}
#dashboard .col.standard-grid p{
margin-top: $std-grid-height - 73px;
font-size: 12px;
margin-left: 25%;
}
#dashboard .col.standard-grid img{
height: 25px;
margin-left: 5%;
margin-top: $std-grid-height/3;
float: left;
}
#dashboard .col.standard-grid.different-grid {
background-color: $golden-color;
color: white;
}
#dashboard .col.tall-grid {
height: $tall-grid-height;
}
#dashboard .col.tall-grid p{
margin-top: $tall-grid-height/2.5;
margin-left: 1%;
text-align: center;
}
#dashboard .col.tall-grid img{
margin-top: $tall-grid-height/4;
margin-left: 43%;
}
#dashboard .taller-row{
float: left;
width: 50%;
height: 0;
padding-bottom: 5%;
margin: -20px -5px 0px 5px;
}
#dashboard .two-rows-in-one-column{
width: 50%;
float: right;
margin: -20px 5px 0px -5px;
}
【问题讨论】:
标签: css sass ionic-framework ionic ionic-view