2012-11-14 63 views
0

我在谷歌瀏覽器中查看網頁時出現了一個奇怪的問題。在ie9/Safari瀏覽器中查看時,嵌入式YouTube視頻效果不錯,但由於某種原因Chrome瀏覽器僅在頁面加載時顯示黑盒子。奇怪的是頁面與頁面交互的時刻,即。用戶向下滾動,視頻將正確顯示。我不確定發生了什麼問題。在谷歌瀏覽器中嵌入YouTube視頻的奇怪錯誤

有問題的頁面是:http://core.slnmedia.com/inspiration/

有網頁上的腳本,將檢測可用的寬度要大瓷磚的權利,如果有sufficent空間,彈出式面板會顯示在對。否則,面板將顯示在左側。如果您調整瀏覽器窗口的大小以使'bevis marks'圖塊位於屏幕的右上角,並且右側只有少量空間,然後單擊它,您將看到我的效果談論。

情況正在發生變化的塊的位置的JavaScript函數就是下面:

$('.large-tile').hover(function() { 
    $(this).find('.bw-photo').hide(); 
    $(this).find('.inspiration-detail-wrapper').show();  
    $(this).css("z-index", "2"); 

    var profile = $(this).find('.inspiration-detail'); 
    if(profile.find('.content').text().trim().length == 0) { 
     showData($(this).attr('id').substring(1, $(this).attr("id").length)); 
    }   

    // **Depending on how much window space is available, position the panel on**left/right   
    var available = $(window).innerWidth() - ($(this).offset().left + 300); 
    if(available >= 412) { 
     // If enough space then show panel on right 
     profile.css("left", "320px");   
    } 
    else { 
     // Otherwise attach left 
     profile.css("left", "-368px");   
    } 
    profile.show(); 

    $('.scrollbar-wrapper').tinyscrollbar({ size: 252 }); 
    }, 
    function() { 
    $(this).find('.bw-photo').show(); 
    $(this).find('.profile').hide();   
    $(this).css("z-index", "1"); 
    $(this).find('.inspiration-detail-wrapper').hide();  
    });  

奇怪的是,該行profile.css(「左」,「320像素」);是什麼原因造成的麻煩。如果你不包括這一行,那麼視頻顯示正確。出於某種原因,定位會導致視頻無法正確顯示。

我希望我已經正確地解釋了這個問題 - 有沒有人知道我在哪裏出錯?這讓我瘋狂!

謝謝

回答

1

我在Microsoft更新後遇到問題。我在上週清除了緩存和Cookie,現在一切正常。

+0

我試過,但沒有不幸的是工作! – alimac83

0

這爲我工作:

<iframe allowfullscreen frameborder="0" height="315" 
src="http://www.youtube.com/embed/A3pIrBZQJvE?wmode=transparent" width="420" 
wmode="Opaque"></iframe> 

Source

相關問題