[英]Image doesn't scale on IE 11
When I change the width of the browser window images doesn't scale on IE 11 or below. 当我更改浏览器窗口的宽度时,图像在IE 11或更低版本上无法缩放。 I does work with Google Chrome.
我确实可以使用Google Chrome浏览器。 I tried to add position: absolute, but it destroying whole layout.
我试图添加位置:绝对位置,但它破坏了整个布局。
Image css: 图片CSS:
.auction-item-img-container {
display: block;
height: 400px;
overflow: hidden;
position: relative;
width: 100%;
background-repeat: no-repeat;
background-position: center;
background-size: cover;
}
@media screen and (max-width: 1024px ) {
.auction-item-img-container {
height: 0;
padding-bottom: 100%;
}
}
@media screen and (max-width: 480px ) {
.auction-item-img-container {
height: 270px;
}
}
Parent and img both have display: block; box-sizing: border-box;
Parent和img都具有
display: block; box-sizing: border-box;
display: block; box-sizing: border-box;
HTML: HTML:
<article onclick="AddCookieWithAuction(1185)" id="auction-1185">
<a class="auction-item-img-container" href="/Aukcje/PodgladAukcji/1185/1/1" style="background-image: url(/Content/images/backgrounds/empty.png)"> </a>
<!-- This part is responsive -->
<div class="auction-item-desc">
<div class="auction-bar">
<h4 class="auction-bar-author"><a href="/Aukcje/PodgladAukcji/1185/1/1">1</a></h4>
<h5 class="auction-bar-title"><a href="/Aukcje/PodgladAukcji/1185/1/1">1</a></h5>
</div>
<div class="auction-price-container">
<div class="actual-price-holder">
<span class="auction-price-label">Cena</span>
<p class="auction-price"><a href="/Aukcje/PodgladAukcji/1185/1/1">123 PLN</a></p>
</div>
<div class="auction-observe">
<a onclick="acc.onObservedButtonClick(1185, this)" class="fa fa-star-o observe-icon"></a>
<a onclick="acc.onObservedButtonClick(1185, this)" class="add-observe">Dodaj do obserwowanych</a>
</div>
</div>
<div class="auction-type-container">
<span class="auction-type"><a href="/Aukcje/PodgladAukcji/1185/1/1">Aukcja w trakcie</a></span>
</div>
</div>
</article>
There is how it looks on both browsers. 两种浏览器都有它的外观。 IMAGE
图片
Might be a little late to the party, but I found this other SO answer that might help you: https://stackoverflow.com/a/42174237/1914261 可能要晚一点参加聚会,但是我发现了另一个可能对您有帮助的答案: https : //stackoverflow.com/a/42174237/1914261
IE11 seems to have some trouble with the initial value of the flex-shrink property .
IE11似乎对flex-shrink属性的初始值有些麻烦。 If you set it to zero (it is initially set to 1), it should work
如果将其设置为零(最初设置为1),则应该可以使用
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.