打开iframe Colorbox时出现白色闪烁 [英] White flash when opening iframe Colorbox

查看:124
本文介绍了打开iframe Colorbox时出现白色闪烁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

打开iframe彩盒时,我得到一个白色的闪光灯。如何预先设置iframe以首先显示白色背景然后显示所谓的iframe?

I get an white flash when opening an iframe colorbox. How can I prevend the iframe to first show the white background and then the supposed iframe?

推荐答案

白色闪光是colorbox动态生成iframe。在加载iframe时,您会看到颜色框窗口本身的背景颜色。

The white flash is the result of colorbox dynamically generating the iframe. While the iframe is loading you see the background color of the colorbox window itself.

解决此问题的一种方法是使用黑色颜色框css样式,如这个jsfiddle 。当您下载彩盒时,您可以在示例3文件夹中找到此colorbox.css文件。使用这种风格,你当然会看到一个黑色闪光而不是白色闪光,但它与彩色框叠加的半透明黑色更好地融合。

One way to solve this issue is to use the "black" colorbox css styles as demonstrated in this jsfiddle. You can find this colorbox.css file in the "Example 3" folder when you download colorbox. Using this style you will of course see a black flash rather than and white flash, but it blends in better with the translucent black of the colorbox overlay.

或者你可以自定义colorbox.css文件最适合您的需求。有5种预制样式,您可以在官方彩盒网站上看到它们。

Alternatively you can customize the colorbox.css file that's best suited to your needs. There's 5 prebuilt styles, which you can see demonstrated at the official colorbox site.

这篇关于打开iframe Colorbox时出现白色闪烁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆