Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 垂直图像在某些手机上是水平的_Html_Css_Wordpress_Image - Fatal编程技术网

Html 垂直图像在某些手机上是水平的

Html 垂直图像在某些手机上是水平的,html,css,wordpress,image,Html,Css,Wordpress,Image,我有一个网站,用户可以在文章中发布图片。图像处于纵向模式,并且它们应该始终处于纵向模式。 但在一些手机(iPhoneX、iPhone5C)(不是我的Redmi note 5)上,它们是水平的 下面是一幅图像的HTML代码: <a href="MyImg.jpg"> <img class="alignnone size-large" src="myImg.jpg" alt="IMG_7768_1200" width="768" height="1024" /> &l

我有一个网站,用户可以在文章中发布图片。图像处于纵向模式,并且它们应该始终处于纵向模式。 但在一些手机(iPhoneX、iPhone5C)(不是我的Redmi note 5)上,它们是水平的

下面是一幅图像的HTML代码:

<a href="MyImg.jpg">
    <img class="alignnone size-large" src="myImg.jpg" alt="IMG_7768_1200" width="768" height="1024" />
</a>

我不知道。这是CSS问题吗?

这是图像元数据的问题。这是相机拍照时设定的。这不是你可以用CSS改变的东西

这意味着什么?我不能解决这个问题?你不能,它不能从CSS或HTMLhanks处理。这在php或js中可能吗?我找不到任何有用的java脚本,我不知道php可以解决这个问题,但是有些服务器端的图像处理器在PHP中是可用的,问题是您必须以编程方式检查元数据,以查看图像的显示方式,甚至检测特定图像是否有问题。最好让一个人在你的网站上勾选一个框(可以添加一个带有旋转规则的CSS类),或者指示他们正确保存他们的图像。这是由于图像的编码,而不是你的CSS。它们需要由图像所有者再次保存,或者您可以在网站上提供旋转图像的功能(通过CSS类)。阅读更多:
img.alignnone {
    display: block;
    max-width: 95%;
    width: auto;
    height: auto;
}

.alignnone, img.alignnone {
    margin-right: 2.5em;
    margin-top: 2em;
    display: inline;
    border: 5px solid #555555;
}