[英]draggable ngx-bootstrap modal only body move and background fixed
我正在使用Angular2-Draggable来创建可拖动模式,但只有内容被拖动并且背景是固定的。
我尝试通过将 angular2-draggable 指令选择器更改为 class ('.ngDraggable') 来修复此错误,但它不适用于父元素(class='modal-dialog' role='document')
我使用下面的代码来显示模态:
this.modalService.show(OwnerAdvertisingOpportunityAddeditComponent,
{ initialState, class: 'ngDraggable modal-lg' });
有什么帮助或想法吗?
回答我自己的问题:
我用 css 解决了这个问题
.modal-dialog.ngDraggable {
.modal-content {
background-color: transparent;
border: none;
box-shadow: none;
}
.ngDraggable {
box-shadow: 0 5px 15px rgba(0,0,0,.5);
border-radius: 6px;
border: 1px solid #999;
overflow: hidden;
}
}
但是如果有人有更好的解决方案,谢谢分享
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.