0
私は自分のチェックボックスを中央に揃えようとしています。新しい入力を追加すると、これは今表示されている方法です: checkboxes not aligned well。多分、ブートストラップまたはだろう任意の他の提案で、私は疑問に思ってチェックボックス角度のあるブーツストラップを使用した中央の垂直アライメント
<div class="container text-center">
<form ng-submit="todoAdd()">
<input type="text" ng-model="todoInput" size="50" placeholder="Add New">
<input type="submit" class="btn btn-success" value="Add New">
</form>
<br>
<div ng-repeat="x in todoList">
<input type="checkbox" ng-model="x.done"> <span ng-bind="x.todoText"></span>
</div>
<p><button ng-click="remove()">Remove marked</button></p>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('todoCtrl', function($scope) {
$scope.todoList = [{todoText:'Clean House', done:false}];
$scope.todoAdd = function() {
$scope.todoList.push({todoText:$scope.todoInput, done:false});
$scope.todoInput = "";
};
$scope.remove = function() {
var oldList = $scope.todoList;
$scope.todoList = [];
angular.forEach(oldList, function(x) {
if (!x.done) $scope.todoList.push(x);
});
};
});
</script>
(ページの中央に)垂直ボックスを整合させるどのような方法がある: これは私が使用していたコード(角とブートストラップ)です役に立った?これは私の最初の質問ですので、事前に謝罪してください。正式に策定されていない場合は、事前にお返事ありがとうございます!