我正在使用 ColorBox's Ajax 模式。
<a class='data-content' href='data/<?=$id?>'> <img src=uploads/thumb_<?=$img?> /> </a>
<script type="text/javascript">
$(document).ready(function(){
$(".data-content").colorbox({
transition: "none",
title: false,
width: "700px",
top: "10px",
loop: false,
scrolling: false
});
});
</script>
单击照片缩略图后,它会加载带有照片和其他内容的颜色框。通常它的高度大于屏幕。所以滚动条出现了。使用其他浏览器(Mozilla、Chrome),我可以上下滚动并毫无问题地查看框中的所有内容。
当使用 IE8 滚动时,颜色框停留在同一个地方,而不是背景滚动。所以我看不到所有内容。
这是一个 example .实际上它是默认的 Colorbox 示例。
关于可能导致问题的任何想法?
最佳答案
可能是这个...来自网站 - http://colorpowered.com/colorbox/#doctype
ColorBox requires a valid doctype and rendering in quirks mode is not supported. If you aren't using the HTML5 doctype, make sure you are using the full doctype declaration (with URI) to insure rendering in standards mode.
Unfortunately, this abbreviated doctype renders the document in quirks mode for Internet Explorer:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
The doctype with URI renders in standards mode for all browsers:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
关于javascript - 在 IE 中滚动颜色框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6213924/