2017-06-19 16 views
0

私はJavaスクリプトで新しくなったので、文字通りコピーしてコードを貼り付けました。画像が正しく読み込まれていないと思います。360度のスライダで画像を読み込めません

<!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> 

だから私のイメージソースは、ディレクトリ内の同じフォルダ内にある:/資産/製品1/

いただきました!間違って私は本当に知らないが、すべてのプラグインやCSSファイルが正常にロードされます。

答えて

0

<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> 
0

あなたは内部の画像がスリーシックスティー画像スライダーの適切

imagePath:'assets/product1/', // path of the image assets 
+0

変更は何も読み取ることができるように がproduct1'/'を追加正しくディレクトリを指定していません...私の画像の名前は1.jpg/2.jpg/3.jpgなどです。名前を変更する必要はありますか?このfilePrefix? ipod-1.jpg/ipod-2.jpg ... –

+0

名前を変更する必要はありません – Rahul

+0

imagePath: '/ assets/product1 /'については、 – Rahul