【发布时间】:2018-08-21 02:03:13
【问题描述】:
我已经使用 angular ngx-gallery 构建了一个图片库。由于没有显示大小图像,因此我无法对工作做出响应。它只显示介质 大小的图像。
这是我的实现方式:
这些是选项:
this.galleryOptions = [
{
width: '100%',
height: '254px',
imageAutoPlay: true,
imageAutoPlayPauseOnHover: true,
imageSize: NgxGalleryImageSize.Contain,
imageAnimation: NgxGalleryAnimation.Slide,
thumbnails: false,
preview: false
},
// max-width 544
{
breakpoint: 544,
width: '100%',
height: '250px',
imageSwipe: true,
imageArrowsAutoHide:true,
imageAutoPlay: true,
imageAutoPlayPauseOnHover: true,
imageSize: NgxGalleryImageSize.Cover,
imageAnimation: NgxGalleryAnimation.Slide,
thumbnails: false,
preview: false
}
];
这是图像数组:(所有 url 已检查)
this.galleryImages = [
{
small: 'assets/images/BannersResponsive/culturizate.jpg',
medium: 'assets/images/Banners/radio_online_venezuela_fondo_demananacontigo.png',
big: 'assets/images/BannersResponsive/culturizate.jpg'
},
{
small: 'assets/images/BannersResponsive/culturizate.jpg',
medium: 'assets/images/Banners/radio_online_venezuela_fondo_conexionyreflexion.png',
big: 'assets/images/Banners/radio_online_venezuela_fondo_conexionyreflexion.png'
}, ];
这是html:
<ngx-gallery class="gallery"
[options]="galleryOptions
[images]="galleryImages"></ngx-gallery>
我还尝试将图像命名为相同的名称,并在名称的末尾加上 small、medium 和 big。
提前谢谢你。
【问题讨论】:
-
我也有同样的问题,但仅限于 chrome。
标签: angularjs gallery image-gallery