2013-05-10 49 views
0

作爲每標題透明背景,加入下面以去除上的fancybox 2.1.4背景正常工作在Safari,FF & Chrome,但不的IE。 (僅在IE8測試)I幀上的fancybox 2.1.4

beforeShow: function(){ 
    //transparent background 
    $(".fancybox-skin").css("background","transparent"); 

    //remove dropshadow 
    $(".fancybox-skin").css("-webkit-box-shadow","0 0 0 rgba(0, 0, 0, 0)"); 
    $(".fancybox-skin").css("-moz-box-shadow","0 0 0 rgba(0, 0, 0, 0)"); 
    $(".fancybox-skin").css("box-shadow","0 0 0 rgba(0, 0, 0, 0)"); 
} 
+0

RGBA顏色不在IE8支持。對於解決方案,請閱讀[CSS背景不透明與rgba在IE 8中不工作](http://stackoverflow.com/q/3975688/1693859) – 2013-05-10 13:48:48

+0

哪個版本的Internet Explorer有問題?舊版本不支持'rgba'和'box-shadow'等功能。 – Sampson 2013-05-10 14:21:11

+0

該rbga是刪除陰影,而不是背景顏色。 – Jin 2013-05-10 14:23:12

回答

0

各地的fancybox的src文件挖後,問題出在IFRAME 「ALLOWTRANSPARENCY」 屬性。

在jquery.fancybox.js線140,具有低於替換行:

iframe : '<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen allowtransparency="true"></iframe>', 
+0

爲什麼要投票? – Jin 2013-06-05 08:11:55