colorbox常见问题
发现colorbox官方网站的troubleshoot写的比较好,转载一下。
1,flash覆盖colorbox:
This is not a colorbox specific problem,by default flash will overlay any html content. This can be prevented by setting the “wmode” param and embed attribute to
'transparent'.
这不是colorbox本身的问题,flash默认会覆盖所有的HTML内容,你可以设置wmode参数为transparent来避免这个问题。
2,colorbox在ie中的位置和行为异常:
这有可能是doctype(DTD)的问题。colorbox需要有个有效的DTD声明,否则浏览器会以怪异模式(quirks mode,在标准模式中,浏览器根据W3C所定来显示页面;而在怪异模式中,页面将以IE5,甚至IE4的显示页面的方式来表示,以保持以前的网页能正常显示)呈现网页内容。务必使用正确的DTD声明来确保浏览器以标准模式呈现网页。
下面这段声明会将IE浏览器设定成怪异模式
?
?
<a href=’login.php’ onclick=’parent.$.fn.colorbox({href:”login.php”}); return false;’>Open from parent</a>?
?
这种方法不能用于group方式,因为parent文档无法访问iframe里的内容,也就是无法访问内部元素的rel属性