语法
css/* 关键字值 */
image-orientation: none;
image-orientation: from-image; /* 使用图片的 EXIF 数据 */
/* 全局值 */
image-orientation: inherit;
image-orientation: initial;
image-orientation: revert;
image-orientation: revert-layer;
image-orientation: unset;
属性值
from-image
根据图片的 EXIF 数据来旋转图片,EXIF 中有一个控制图片旋转度的属性。
图片旋转值
flip
对图片进行水平翻转,先进行第二个参数执行的旋转,再进行此次翻转。
形式语法
初始值from-image适用元素所有元素是否是继承属性是计算值an
形式定义
image-orientation = from-image | none | [
此语法反映了基于 CSS Images Module Level 3 的最新标准。并非所有浏览器都已实现全部内容。有关支持信息,请参阅浏览器兼容性。
示例
规范
规范
CSS Images Module Level 3# the-image-orientation
浏览器兼容性
参见
其他和图片相关的 CSS 属性:image-rendering、image-resolution。
帮助改进 MDN
此页面对您有帮助吗?
是
否
了解如何参与贡献
此页面最后更新于 2025年11月3日,由 MDN 贡献者更新。
在 GitHub 上查看此页面 • 报告此内容的问题