我正在尝试用angular-ui-0.6.0和bootstrap-3.0制作模式窗口。
我的模板是:
<div class="modal-header">
<h3>Create new entry</h3>
</div>
<div class="modal-body" ng-repeat="e in create_elements">
<label>Test</label>
<input class="form-control" style="height: 30px; width: 98%" type="text" required ng-model="e.model"></input>
<label id="{{e.label}}" style="display: none; color: red;">{{e.label}} - can't be empty</label>
</div>
<div class="modal-footer">
<button class="btn btn-success" ng-click="create(create_elements)">Create</button>
<button class="btn btn-warning" ng-click="close()">Cancel</button>
</div>模式的css:
.modal {显示:块;}
模式窗口正常打开,但它的高度超过了需要的高度。我尝试为.modal设置height: auto,但是没有帮助。

你可以在脚下看到白色的地方,怎么去掉它?
谢谢。!
发布于 2014-01-21 14:49:38
为了控制对话框的高度,我执行了以下操作:
将此设置放在modal.open配置中,以避免与其他对话框冲突
windowClass: 'your-modal-class',然后在我的css中添加了以下内容:
div.your-modal-class .modal-content {
max-height: 600px;
overflow: auto;
}https://stackoverflow.com/questions/20628832
复制相似问题