繁体   English   中英

chrome和Internet Explorer 11的图像大小差异

[英]Image size difference between chrome and internet explorer 11

我正在为图像添加一个简单的网站,但是正在计算Internet Explorer 11上的大小要小得多,并且图像之间会发生变化:

互联网浏览器图片

但适用于chrome

镀铬图像

这是图片的CSS:

.postImage {
  padding: 0 0 0 15px;  
  height: 50px;
  width: 50px;
  border-radius: 2px;
}

提前致谢!

因此,在进行了一些修改并从这里获得帮助之后,我得到了它在各种浏览器上的工作。 自从我两次设置高度以来,这似乎很奇怪,但这是按预期的方式对IE11起作用的唯一方法。

家长班:

.postBox{
  height: 100px;
  width: 220px;
  margin-bottom:15px;
  display: flex;
  cursor :pointer;

  /* to fix IE11 */
    min-height:1px;
  padding: 10px 0 0 0px;
}

子图像类:

.postImage {
  padding: 0 0 0 15px;  
  border-radius: 2px;

/*   to fix IE11 not working */
  max-height:50px;
  max-width:50px;
  height: 50px;
}

暂无
暂无

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

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