我有一个简单的启动页面,我想在一个div中淡入淡出。出于某种原因,我无法在Safari中使用它。在Safari那只能说明$(文件)。就绪(函数(){和下面的图片,但就是它,没有效果Jquery Fade在Safari中不工作
工作正常FF和Chrome
$(document).ready(function(){
$("#image").hide().fadeIn(3500)
});
全部源代码如下。:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Sample</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<style type="text/css">
<!--
#image {
position: fixed;
top: 50%;
left: 50%;
margin-top: -100px;
margin-left: -300px;
}
-->
</style>
<script type="text/javascript" />
$(document).ready(function(){
$("#image").hide().fadeIn(3500)
});
</script>
</head>
<div id="image"><img src="14.png" alt="Sample" /></div>
<body>
</body>
</html>
您可以包括整个HTML增加了额外的 '/'? Safari不应该显示脚本。 – ysrb 2011-04-07 03:36:55
新增完整的HTML源代码 – RonnieT 2011-04-07 03:41:45