Make transparent space between ion-items

1

I have an ionic list, and I want that between each ion-item there is a space of 15 px, transparent color, so as to "see the bottom" of the screen in the space between the ion-items. I have tried all the ways, but it does not work, I will agreadeceré if you can help me. Thank you very much!

<ion-list >
  <ion-item ng-repeat="respuesta in respuestas"
    item="respuesta" ng-click="clicker(respuesta)"
    style="background: violet; border: 15px none transparent !important;">
      <h5 class="item-text-wrap" style="color: white">{{respuesta.detalle}}</h5>
  </ion-item>
</ion-list>

If I put color instead of transparent, it works.

    
asked by Guille 10.05.2018 в 21:09
source

1 answer

0

I think you're confusing border with margin: the border does not have background , so it can not be transparent.

The solution is simple: add a margin between each element:

div {
 width:200px;
 background-color: red;
}
li {
  background: violet;
  margin: 15px;
}
<div>
<ul>
<li>uno</li>
<li>dos</li>
<li>tres</li>
<li>cuatro</li>
</ul>
</div>
    
answered by 10.05.2018 / 21:43
source