我目前正試圖實現fancybox。我想將它設置爲autodimensions,但每次第一次加載時都有bug。Fancybox autodimensions
$.fancybox({
'autoScale' : true,
'autoDimensions' : true,
'content' : html
});
在第一負載(第一次點擊一個新開的瀏覽器中執行)中的fancybox寬度和高度是不正確的,但是當我再試一次(點擊使用打開的瀏覽器),在的fancybox顯示的是我所期望的輸出。我猜它不能識別寬度和高度。
的阿比說 autodimensions
For inline and ajax views, resizes the view to the element recieves. Make sure it has dimensions otherwise this will give unexpected results
我想知道到底是什麼「尺寸」是什麼意思......也許這就是爲什麼我的fancybox是馬車。
我很感激任何幫助......謝謝!
解決方案是讓我直接在我的內聯內容中顯示style =「width:500px; height:auto; overflow:hidden」。該CSS顯然是工作,但與跨瀏覽器兼容性的問題。謝謝你的提示!我現在瞭解'尺寸'! :D – Woppi