0

我正在使用 ng-include 调用我的表单“test_form”,显示按钮在中心对齐。如何将它们对齐在表单的右下角?

索引.html

<div class="col-sm-6 sidenav">
  <!-- menu bar content at the top -->
<div class="column-nav-form" ng-include = "'/views/html/test_form.html'" >
</div>

test_form.html

<form name="testForm" ng-app="myApp" ng-controller="FormController" class="container-fluid" ng-submit="submit()">
<!-- form labels -->
    <md-button class="md-raised md-primary testForm" type ="button" ng-click ="reset()">CANCEL</md-button>
    <md-button class="md-raised md-primary testForm" ng-disabled="testForm.$invalid">SAVE</md-button>
</form>

CSS

.md-button.md-raised.md-primary.testForm {
    position: right !important;
    color: #FFFFFF;
    background-color: #4CAF50;
}

表单按钮显示:

在此处输入图像描述

4

1 回答 1

0

pull-right 课程成功了。

<form name="testForm" ng-app="myApp" ng-controller="FormController" class="container-fluid" ng-submit="submit()">
<!-- form labels -->
    <md-button class="md-raised md-primary pull-right testForm" type ="button" ng-click ="reset()">CANCEL</md-button>
    <md-button class="md-raised md-primary pull-right testForm" ng-disabled="testForm.$invalid">SAVE</md-button>
</form>
于 2016-02-02T22:44:39.407 回答