我有一个弹出窗口与尺寸(宽度,高度)和ngx图像裁剪器(https://www.npmjs.com/package/ngx-image-cropper)里面
<div mat-dialog-container>
<image-cropper
[imageBase64]="imageFile"
[maintainAspectRatio]="true"
[aspectRatio]="aspectRatio"
[cropperStaticWidth]="cropperStaticWidth"
[cropperStaticHeight]="cropperStaticHeight"
[hideResizeSquares]="true"
format="png"
(imageCropped)="imageCropped($event)"
(imageLoaded)="imageLoaded()"
(cropperReady)="cropperReady()"
(loadImageFailed)="loadImageFailed()"
></image-cropper>
</div>在我的例子中,宽度大小是819 * 202,当我检查( imageFile : width= 749,933;height=184,967)的img标记时,它超出了弹出窗口的尺寸(在我的例子中,宽度= 698)。
我想要的标签宽度适合弹出窗口的宽度与10px的左边距以及右侧
发布于 2020-11-29 21:13:25
对不起,我头晕,我把一个div错误地放在了标签image-cropper的容器中,宽度= 460,高度= 425。我移除了它,现在它可以工作了。
再次道歉
https://stackoverflow.com/questions/65058705
复制相似问题