我正在研究這些富媒體廣告的工作,他們在所有瀏覽器中工作,直到我開始使用jQuery css方法。 IE中沒有任何內容顯示,昨天我參加會議時這不是問題。我可能鏈接到的唯一可能是IE處理css的方式不同。任何幫助將不勝感激,這裏是我的代碼示例。Firefox和IE如何處理jQuery CSS有什麼區別?
<!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>Molson Canadian Ad Template</title>
<style type="text/css">
body {
background-color: #333;
}
</style>
<script src="http://code.jquery.com/jquery-1.5.js"></script>
<script src="jquery.swfobject.1-1-1.min.js" type="text/javascript"></script>
<script>
$(document).ready(
function() {
jsReady = true;
banner1 = $('#banner1');
banner1.css({overflow:'hidden', position:'absolute', left:158});
banner1.flash({swf: 'molson1_300x250.swf', width: 300, height: 250, play: true, flashvars: {message:'in'}});
}
);
var jsReady = false;
function isReady() {
return jsReady;
}
function sendToJavaScript(value) {
if(value == "expand"){
banner1.css('left', 0);
banner1.flash().remove();
banner1.flash({swf:'molson1_600x250.swf', width:600, height:250, wmode:"transparent"});
}else{
banner1.css('left', 158);
banner1.flash().remove();
banner1.flash({swf: 'molson1_300x250.swf',width: 300,height: 250,play: true},function(){this.GotoFrame(71)});
}
}
</script>
</head>
<body>
<div id="banner1"></div>
</body>
</html>
到底是什麼錯呢? – 2011-03-18 16:25:33