Created
August 29, 2015 21:51
-
-
Save ryancat/0377ce2ab7329c11ccdc to your computer and use it in GitHub Desktop.
BoBeOp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="parent" ng-app="MyApp"> | |
<div class="container" ng-controller="MyCtrl"> | |
<div class="item" ng-repeat="item in items">{{item.name}}</div> | |
<div class="item placeholder" ng-repeat="item in items"></div> | |
<div class="item placeholder" ng-repeat="item in items"></div> | |
<div class="item placeholder" ng-repeat="item in items"></div> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = angular.module('MyApp', []); | |
app.controller('MyCtrl', ['$scope', function ($scope) { | |
var i; | |
$scope.items = []; | |
for ( i = 0; i < 18; i++) { | |
$scope.items[i] = { | |
name: i | |
}; | |
} | |
}]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.14/angular.min.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.parent { | |
width: 200px; | |
} | |
.container { | |
display: flex; | |
flex-wrap: wrap; | |
justify-content: space-between; | |
border: 1px solid #A6A6A6; | |
padding: 5px; | |
padding-bottom: 0; | |
} | |
.item { | |
border: 1px solid #A6A6A6; | |
border-radius: 3px; | |
width: 30px; | |
height: 20px; | |
text-align: center; | |
margin-bottom: 5px; | |
} | |
.placeholder { | |
visibility: hidden; | |
height: 0; | |
padding: 0; | |
margin: 0; | |
border-top-width: 0; | |
border-bottom-width: 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment