Javascript数组(图像滑块)(Webkit中的bug?)

Javascript数组(图像滑块)(Webkit中的bug?),javascript,arrays,google-chrome,safari,Javascript,Arrays,Google Chrome,Safari,我的网站上有一个图像滑块,它在IE、Firefox和Opera上似乎运行良好。但它不适用于Chrome和Safari。(例如:) 风险值数据=[ [“fotos/DSC_0055(大).JPG”,“Duitse herder”,“fotos/DSC_0055(大).JPG”], [“fotos/DSC_0154(大).JPG”,“Duitse herder”,“fotos/DSC_0154(大).JPG”], [“fotos/DSC_0194(大).JPG”,“Duitse herder”,“

我的网站上有一个图像滑块,它在IE、Firefox和Opera上似乎运行良好。但它不适用于Chrome和Safari。(例如:)


风险值数据=[
[“fotos/DSC_0055(大).JPG”,“Duitse herder”,“fotos/DSC_0055(大).JPG”],
[“fotos/DSC_0154(大).JPG”,“Duitse herder”,“fotos/DSC_0154(大).JPG”],
[“fotos/DSC_0194(大).JPG”,“Duitse herder”,“fotos/DSC_0194(大).JPG”],
[“fotos/SSA41896(大).jpg”,“Duitse herder”,“fotos/SSA41896(大).jpg”],
[“fotos/DSC_0143(大).JPG”,“Duitse herder”,“fotos/DSC_0143(大).JPG”]
]
imgPlaces=4
imgWidth=230
imgHeight=122
imgSpacer=0
dir=0
newWindow=1
moz=document.getElementById&!文件。全部
步骤=1
timer=“”
速度=10
nextPic=0
initPos=新数组()
nowDivPos=新数组()
函数initHIS3()
{
对于(变量i=0;idata.length-1)
{
nextPic=0
}
currentImage.src=data[nextPic][0]
currentImage.alt=data[nextPic][1]
currentImage.i=nextPic
currentImage.onclick=函数()
{
his3Win(数据[this.i][2])
}
下一代++
}
其他的
{
currentImage.style.left=nowDivPos[i]+“px”
}
}
定时器=设置超时(“scrollHIS3()”,速度)
}
函数stopHIS3()
{
清除超时(计时器)
}
功能his3Win(loc)
{
如果(loc==“”)
{
返回
}
如果(新窗口===0)
{
位置=loc
}
其他的
{
newin=window.open(loc,'win1','left=430,top=340,width=300,height=300')
newin.focus()
}
}
我几乎100%确定问题出在数组中,但我似乎无法弄清楚到底是什么问题

提前感谢。:)

尝试使用

 position:relative; 
并将第一个从左向右/从右向左移动(其他人将相应地跟随,因为relative会告诉em跟随第一个图像)


。我非常确信,这将开始在chrome上工作。因为相对位置告诉它使用不同的位置。打开滑块时,我在chrome控制台中发现了一些错误:它们都有相同的左侧:这是一起改变的。

img定位有问题,所有图像都有相同的位置(顶部,左侧),因此您只能看到其中一个
 position:relative;