簡體   English   中英

更改圖像的寬度和高度而不裁剪它

[英]Change width and height of image without cropping it

我正在嘗試更改 angularjs 中圖像標簽的寬度和高度,但以下內容會裁剪圖像而不是重新調整其大小。 我嘗試了 ng-image-resize 但徒勞無功。

ng-src="{{imageInfo.DecachedImageUrl}}" style="width:380px ; height:295px"

這在 HTML 中與在 angular 中相同。 只需使用寬度/高度屬性而不是樣式。

ng-src="{{imageInfo.DecachedImageUrl}}" width="380px" height="295px"

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM