答案 0 :(得分:0)
您可以使用Bootstrap Col或媒体查询来做出响应 如果可以重写您的html代码并添加col,那就很好
<div class="row">
<div *ngIf="" class="col-sm-12>
/* .... */
</div>
</div>
或使用媒体查询
@media only screen and (min-width: 1024px),
only screen and (min-device-width: 1024px) and (orientation:portrait),
only screen and (min-device-width: 1024px) and (orientation:landscape) {
#gallery {
width: 50% !important;
min-height: 300px;
}
}
@media only screen and (min-width: 450px) and (max-width: 1023px) and (orientation: landscape) {
#gallery {
min-height: 400px;
// max-height: 50% !important;
}
}
@media (max-width: 450px) {
#gallery {
// max-height: 50% !important;
// width
}
}