我是java脚本的新手,所以我从字面上复制并粘贴代码,我认为它没有正确加载图像。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="CSS.css">
<link rel="shortcut icon" type="image/ico"
href="../../CONTENT/Images/Logo/ICO.ico" />
<link rel="stylesheet" href="src/styles/threesixty.css">
<title>pappu-lighting</title>
<script src="jquery-3.2.1.js"></script>
</head>
<body>
<div class="threesixty" id="mythreesixty">
<div class="spinner">
<span>0%</span>
</div>
<ol class="threesixty_images"></ol>
</div>
<script type="text/javascript" src="src/threesixty.js"></script>
<script>
window.onload = init;
var product;
function init(){
my360 = $('#mythreesixty').ThreeSixty({
totalFrames: 72, // Total no. of image you have for 360 slider
endFrame: 72, // end frame for the auto spin animation
currentFrame: 1, // This the start frame for auto spin
imgList: '.threesixty_images', // selector for image list
progress: '.spinner', // selector to show the loading progress
imagePath:'assets/product1', // path of the image assets
filePrefix: 'ipod-', // file prefix if any
ext: '.jpg', // extention for the assets
height: 265,
width: 400,
navigation: true,
disableSpin: true // Default false
});
}
</script>
</body>
</html>
所以我的图像源位于目录中的同一文件夹中:/assets/product1/
我真的不知道出了什么问题,但是所有插件和CSS文件都正确加载。
三六十图像滑块的示例
<div class="threesixty product1">
<div class="spinner">
<span>0%</span>
</div>
<ol class="threesixty_images"></ol>
</div>
<script type="text/javascript">
window.onload = init;
var product;
function init(){
product1 = $('.product1').ThreeSixty({
totalFrames: 72, // Total no. of image you have for 360 slider
endFrame: 72, // end frame for the auto spin animation
currentFrame: 1, // This the start frame for auto spin
imgList: '.threesixty_images', // selector for image list
progress: '.spinner', // selector to show the loading progress
imagePath:'assets/product1/', // path of the image assets
filePrefix: 'ipod-', // file prefix if any
ext: '.jpg', // extention for the assets
height: 265,
width: 400,
navigation: true,
disableSpin: true // Default false
});
}
</script>
您没有正确指定目录在product1
后添加一个'/'
,以便可以正确读取内部的图像
imagePath:'assets/product1/', // path of the image assets