在下面的图片请看:显示一行中的所有项目,但保留最后一项空间?
我有following代码,现在我要永远显示所有项目(社交圈)在一排(取决于屏幕大小),但最后项目应始终在适当位置(桌面,平板电脑,手机)。
<body ng-controller="MainCtrl">
<button class="btn-select-user" ng-repeat="item in items | limitTo: limit as result">
<span>
<img ng-class="{}" ng-src="https://graph.facebook.com/4/picture?height=46&type=square&width=46" width="40" height="40" src="https://graph.facebook.com/4/picture?height=46&type=square&width=46">
</span>
</button>
<span class="badge pull-right" ng-click="limit = items.length" ng-hide="limit == items.length">Show all</span>
</body>
有什么建议吗?
你的意思说白圈可以去如果屏幕较小,红色总是保持在顶部,则更多行? – jakob
当圆圈变多时,红色将被隐藏('ng-hide'指令照顾这一点),我只想在可用空间中显示尽可能多的项目,但最后一个项目必须是红色的(因为它已被使用为“全部显示”) – vitozev
顺便说一下,将'vertical-align:top;'添加到'.badge'样式 –