我使用一个简单的JavaScript方法在点击按钮时打开颜色框&它在所有浏览器中都能正常工作,IE8除外,它将在兼容模式下刷新页面推送浏览器。这是我的代码示例:
<script type="text/javascript">
function PopulateReferral() {
$.colorbox({ inline: true, width: "775px", height: "800px", href: "#divPartialReferralUpdate" });
}
</script>
<div id="divPartialReferralUpdate" style="margin:10px;">
<div id="divCurrentNotes" style="max-height:300px; width:660px; overflow:scroll"></div>
</div>
如果,我从div上的样式中删除溢出标记,它工作得很好。colorbox&溢流有没有办法固定div高度?
我也经历过IE8将自动进入comp模式的这种行为。在我的情况下,我更改了一些css,它是可以的。
你可以尝试自动溢出,但我不能100%确定IE8是否会提供滚动条。
<div id="divCurrentNotes" style="max-height:300px; width:660px; overflow:auto;"></div>