簡體   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