简体   繁体   English

图像在 img 标签中旋转

[英]Image rotating in img tag

When you go directly to the image URL the image is not rotated, but within the image tag the image is rotated.当您将 go 直接转到图像 URL 时,图像不会旋转,但在图像标签内图像会旋转。

https://codesandbox.io/embed/wonderful-beaver-zvfp2 https://codesandbox.io/embed/wonderful-beaver-zvfp2

I'm not sure what is going on我不确定发生了什么

(I use Azure to host images) (我使用 Azure 来托管图像)

If this is happening to all images then you can simply add a transform css tag to rotate the image 90 degrees如果所有图像都发生这种情况,那么您只需添加一个变换 css 标签即可将图像旋转 90 度

eg:-例如:-

    style={{
      height: "500px",
      borderRadius: "15px 15px 15px 15px",
      boxShadow: "0px 5px 15px -4px #000000",
      transform:"rotate(90deg)",  <-----
    }}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM