[英]How to set a white background color for a lightbox in Angular?
I need to set the background-color property to white for gallery item.我需要将图库项目的背景颜色属性设置为白色。 Now I'm using this code to open the full-screen:
现在我正在使用此代码打开全屏:
this.lightbox.open(0, 'lightbox1', { panelClass: 'fullscreen'})
How Can I achieve this?我怎样才能做到这一点?
You can manipulate the lightbox.css and change styles for the lightbox as fits you, However that will be a bad practice since you are changing the source and that will reflect all lightbox's you are using in your application.您可以操作 lightbox.css 并根据需要更改灯箱的样式,但是这将是一个不好的做法,因为您正在更改源并且这将反映您在应用程序中使用的所有灯箱。
However, you can alter the lightbox style in a specific component using ::ng-deep as follows:但是,您可以使用 ::ng-deep 更改特定组件中的灯箱样式,如下所示:
::ng-deep lightbox gallery {
background-color: white !important;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.