我的滑块有问题。问题是图像滑出后图像不会出现。这是来自YouTube的旧代码,它说 cordova.plugins.pdf.htmlToPDF({
data: content,
type: "base64"
},
(success) => {
// you might have to turn the base64 into a binary blob to save it
// to a file at this point
},
(error) => console.log('error:', error);
);
}
可能存在一些问题,但我检查了所有内容,但仍然没有检查。它与视频中的代码相同,我无法理解问题所在。
setInterval

function Slider(){
$(".slider #1").show("fade",1500);
$(".slider #1").delay(5000).hide("slide",{direction:"left"},500);
var sc = $(".slider img").size();
var count = 2;
setInterval(function(){
$(".slider #" + count).show("slide",{direction:"right"},500);
$(".slider #" + count).delay(5000).hide("slide",{direction:"left"},500);
if(count == sc){
count = 1;
}else{
count = count + 1;
}
},6000);
}

.slider {
overflow:hidden;
width:800px;
height:350px;
margin:30px auto;
}
.slider img{
width:800px;
heigth:350px;
display:none;
}