简体   繁体   中英

ng-Repeat in horizontal

I have a list of a result of a search, I want to have at least 3 items horizontally and then a line break. I tried using the following css but had "broken" the layout. How I can do this?

    <div class="list-group">
      <ul ng-repeat="agencia in listaAgencias | filter: pesquisar" class="list-group">
        <li ng-show="pesquisar.length > 0" class="list-group-item" ng-click="selecionarAgencia(agencia)">
          {{agencia.nome}}
        </li>
      </ul>

在此处输入图片说明

how about use this css

ul {
    display: block;
    list-style: none;
    width: 80%;
}

ul li {
    float: left;
    width: 33%;
}

https://jsfiddle.net/7j92u/74/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM