1
好吧,这是一个巨大的问题。我正在建设的网站依赖于Fancybox,并且它必须是IE兼容....我只是开始学习,当点击启动fancybox(safari和firefox)的div时,它不会出现在IE 7(IE 8 似乎工作)。我的脚本是这样的:jQuery Click事件不能在IE中使用Fancybox调用
jQuery(document).ready(function() {
$(".students_button").click(function(){
$.fancybox(
'<p>HTML content here</p>',
{
'autoDimensions' : false,
'width' : 600,
'height' : 'auto',
'transitionIn' : 'fade',
'transitionOut' : 'fade'
}
);
});
});
我对按钮CSS显示为这样:
#content #home #buttons {
width: 310px;
float: left;
margin-right: 10px;
margin-right: 0;
}
#content #home #buttons #button {
display: block;
height: 70px;
border-radius: 15px;
-moz-border-radius: 15px;
-webkit-border-radius: 15px;
background: #3a79f7 url(/images/blue_button_bg.png) repeat-x;
filter: e("progid:DXImageTransform.Microsoft.gradient(startColorstr='#3d7cfa', endColorstr='#2463e1')");
background: -webkit-gradient(linear, left top, left bottom, from(#3d7cfa), to(#2463e1));
background: -moz-linear-gradient(top, #3d7cfa, #2463e1);
pointer: hand;
margin-bottom: 10px;
}
#content #home #buttons #button #text {
color: #ffffff;
font-size: 22pt;
text-align: center;
position: relative;
top: 13px;
z-index: 1000;
}
最后,我的HTML是这样的:
<div id="content">
<div id="home">
<div id="buttons">
<div id="button">
<div id="text" class="students_button">Students</div>
</div>
</div>
</div>
</div>
如果它的事项,我m使用一些特定于IE的CSS来调用边界半径攻击:
#content {
#home {
#buttons {
#button {
behavior: url(/border-radius.htc);
}
}
}
}
border-radius.htc文件可以位于here。如果它很重要,我正在使用jQuery 1.5.1和Fancybox 1.3.4。
非常感谢您为解决此问题提供的任何帮助!
*啪啪啪*哼!我使用的不是IE 7支持的HTML 5文档类型!任何想法用HTML 5文档来解决这个问题? – 2011-03-21 17:59:57
在stackoverflow上有类似的问题,但目前没有答案被标记为答案.http://stackoverflow.com/questions/5036315/standards-mode-in-ie7-with-html5 – 2011-03-21 18:20:23