【发布时间】:2017-06-17 18:40:26
【问题描述】:
我使用了 PrimeNg 的 p_galleria 并设置了这个属性:
<p-galleria [images]="productImages"
panelWidth="560"
panelHeight="313"
autoPlay="false"
showFilmstrip="false"
id="product-galley"
showCaption="false">
</p-galleria>
我还为渲染图像面板添加了一种样式:
.ui-panel-images {
/*height: inherit !important;
width: inherit !important;*/
/*max-height: inherit !important;
height: initial;
max-width: inherit !important;
width: initial;*/
max-width: 100%;
max-height: 100%;
width:auto;
height:auto;
}
但图像总是在容器中拉伸,我希望它按比例固定。并位于面板的中心。
有没有办法改变样式?
也许它不相关,但我把这个画廊包装在一个 引导模式。
【问题讨论】:
标签: css image angular fixed primeng