簡體   English   中英

IE11高度問題

[英]IE11 Height issue

我正在嘗試將image1的高度分配給圖像2。在Edge,Chrome和Firefox中可以正常工作。 IE11無法正常工作,並且沒有錯誤消息。 這是在Edge,Chrome和Firefox中的外觀:沒問題:
沒有任何問題 在IE11中:IE11問題:
IE11問題

 function setIntHeight() { var g1 = $('.grid-tile').eq(0), h = g1.find('img').height(); $('.interruptor1, .interruptor2').height(h); } function interruptorHeight() { $(window).on('load', setIntHeight); $(window).on('resize', debounce(setIntHeight)); } interruptorHeight(); 
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <!--Image 1--> <li class="grid-tile"> <div class="product-tile" > <div class="product-image"> <img src="https://development-na01-arden.demandware.net/dw/image/v2/BBVB_DEV/on/demandware.static/-/Sites-master-catalog/default/dwf7e4c6a8/images/large/8B-AP04151-cc521986-d8f4-4c81-b43a-787622068cba.jpg?sw=265&amp;sh=398&amp;sm=fit" alt="PLUS Blessed Tee"> </div> </div> </li> <!--Image 2--> <li class="bg-image grid-tile interruptor1"> <img src="https://development-na01-arden.demandware.net/on/demandware.static/-/Sites-ardene-Library/default/dwb58b67e0/homepage/MasonryImage5.jpg" alt="PLUS Blessed Tee" > </li> 

$(window).on('load',setIntHeight); 在IE11中無法正常工作。 請嘗試使用:

 window.onload = function() { setIntHeight(); }; 

網站上到處都有很多解釋,需要研究。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM