【问题标题】:how to display portrait image in html page如何在html页面中显示纵向图像
【发布时间】:2015-10-01 00:32:43
【问题描述】:

如何在 html 中显示肖像图像?我使用了img 标签。我的纵向图像被旋转 90 度并以横向显示。

如何以原始方向显示图像?

【问题讨论】:

  • 没有更多的上下文是不容易提供帮助的。如果你有一个简单的 html 标签<img src="yourPortraitImage.jpg">AFAIK,图像会显示它是如何拍摄的——所以肖像图像应该显示为肖像。如果您添加代码和更多信息,则更容易提供帮助。
  • 我使用的是简单的 html 标签 但是肖像图像显示不正确。
  • 通过浏览相关问题我foundA ... mismatch exists between the web, where the orientation of an image is determined by how its pixels are stored, and digital photography, which increasingly relies on metadata to mark the image as rotated, storing the pixels in the same orientation no matter what.您可能会在extract image orientationcorrect orientation in mobile browser找到更多信息

标签: html image


【解决方案1】:

为你的元素试试这个 CSS:

-ms-transform: rotate(90deg);
-webkit-transform: rotate(90deg); 
transform: rotate(90deg);`

【讨论】:

  • 我想同时显示横向和纵向图像,这个 CSS 也是旋转横向图像。
猜你喜欢
  • 2017-07-23
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-10-07
  • 1970-01-01
  • 1970-01-01
  • 2019-10-01
相关资源
最近更新 更多