为什么这个 Javascript 代码停止向左滑动:-100%?
函数幻灯片左(sellBody){
var slideLeft = document.getElementById("sellBody");
var currentLeft = parseFloat(slideLeft.style.left);
if(slideLeft.style.left<"0"){
slideLeft.style.transition = "left 1.0s ease 0s";
slideLeft.style.left = (currentLeft + 100) + "%";
}
}
功能幻灯片(sellBody){
var slideRight = document.getElementById("sellBody");
var currentRight = parseFloat(slideRight.style.left);
if(slideRight.style.left>"-500%"){
slideRight.style.transition = "left 1.0s ease 0s";
slideRight.style.left = (currentRight - 100) + "%";
}
}