我正在使用ng-dialog来显示弹出窗口。使用ng-dialog时遇到的问题是当消息很大但对话框中没有垂直滚动条但是整个html页面都出现滚动条。
有没有办法可以在ng-dialog框上显示滚动条。
我正在使用https://github.com/likeastore/ngDialog
中的ngdialog.js我google了我最好的,但没有想到如何带滚动条。请我在css中更大。
下面是我用来弹出弹出窗口的代码。
ngDialog.open({ template: 'resources/views/popup.html', className: 'ngdialog-theme-default' , scope: $scope });
任何建议都非常感激。
答案 0 :(得分:0)
你应该设置overflow-y:scroll;在对话框模板中的内容元素上。
HTML:
<div class="modal-content">
<ul class="list-group">
<li class="list-group-item" ng-repeat="item in items">{{::item.name}}</li>
</ul>
LESS:
.modal-content {
.choose-modal-content {
height: 100%;
width: 100%;
ul {
&.list-group {
overflow-y: scroll;
}
}
}
}
这样,当内容溢出时,ul将可滚动。