Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个非常奇怪的问题,我花了数小时试图解决,但无处可去。
我的网站上有一个 jQuery 滚动窗格,可让您滚动浏览各种产品。当页面加载时,没有显示任何产品。但是,当您稍微调整浏览器窗口大小或打开/关闭 firebug 时,产品会弹出并正确显示。
一个例子可以在这里找到。
我有类似的问题。它可能是由分离后删除父元素引起的。
var $img = $("<img>").attr....... // ---- loading $parent.append($img); var w = $img.naturalWidth.... $img.detach(); $parent.remove(); $anotherDiv.append($img);
图形卡上的数据未更新时呈现黑色方块。我通过分离 $parent 而不是删除解决了我的问题。