Angular 7-以img标签显示方向的图像

问题描述 投票:0回答:1

[在img标签中显示图像时,它始终显示原始方向。我想显示旋转图像的确切方向,这是使用angular属性绑定源时的代码:

<img [src]="imageSrc">

这是我在Windows资源管理器中查看时的图像enter image description here

这是我网站上的图片enter image description here

angular7 orientation
1个回答
0
投票

发生这种情况是因为图像的原始方向不像我们在图像查看器中看到的那样。检查图像的原始方向。

尝试将此添加到您的CSS文件中

img {
    image-orientation: from-image;
}

image orientation

© www.soinside.com 2019 - 2024. All rights reserved.