2016-03-23 60 views
-2

在我的電腦上它工作正常,但只要我上傳它,它停止工作,我不知道爲什麼。看看鏈接,看看它會發生災難性的錯誤。代碼將無法在服務器上工作?

http://www.coachella.eu/ 

我不明白爲什麼它不會工作,因爲它來自這裏; https://css-tricks.com/seamless-responsive-photo-grid/

<html> 
    <head> 
      <title>Coachella - Images</title> 
      <meta charset="utf-8"> 
      <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
      <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes"> 
      <link rel="stylesheet" href="stylesheets/style.css">  
    </head> 


    <body> 
     <?php include_once("analyticstracking.php") ?> 
     <section id="photos"> 
      <img src="images/2015/1.jpg" alt="Hipster Girl"> 
      <img src="images/2015/2.jpg" alt="Beyonce"> 
      <img src="images/2015/3.jpg" alt="Azealia banks"> 
      <img src="images/2015/4.jpg" alt="Hipster"> 
      <img src="images/2015/5.jpg" alt="Girlfriends"> 
      <img src="images/2015/6.jpg" alt="Fake Tan"> 
      <img src="images/2015/7.jpg" alt="Paris Hilton?"> 
      <img src="images/2015/8.jpg" alt="Some C List Celebrity"> 
      <img src="images/2015/9.jpg" alt="Group of Californian girls"> 
      <img src="images/2015/10.jpg" alt="Sunset"> 
      <img src="images/2015/11.jpg" alt="Pouting & Sun Tans"> 
      <img src="images/2015/12.jpg" alt="Giant Spaceman"> 
      <img src="images/2015/13.jpg" alt="Girl with American Flag"> 
      <img src="images/2015/14.jpg" alt="4 tanned girls, one white one"> 
      <img src="images/2015/15.jpg" alt="Girls in white dresses"> 
      <img src="images/2015/16.jpg" alt="Showing skin and american flag"> 
      <img src="images/2015/18.jpg" alt="Cute couple"> 
      <img src="images/2015/19.jpg" alt="The crowd"> 
      <img src="images/2015/20.jpg" alt="Big Wheel"> 
      <img src="images/2015/21.jpg" alt="Girls eating"> 
      <img src="images/2015/22.jpg" alt="Grassy field"> 
      <img src="images/2015/24.jpg" alt="Packed crowd"> 
      <img src="images/2015/25.jpg" alt="Couples holding hands"> 
      <img src="images/2015/26.jpg" alt="Over Accessorised"> 
      <img src="images/2015/27.jpg" alt="Kardashian Girls"> 
      <img src="images/2015/28.jpg" alt="One of the Kardashians"> 
      <img src="images/2015/30.jpg" alt="Girl with open dress"> 
      <img src="images/2015/31.jpg" alt="Breaking Bad's Aaron Paul"> 
      <img src="images/2015/33.jpg" alt="Drone shot of crowd"> 
      <img src="images/2015/34.jpg" alt="Paris Hilton"> 
     </section> 
    </body> 

CSS正在我的電腦上也沒關係!

body { 
     padding: 0px; 
     @apply(--layout-fullbleed); 
     @apply(--paper-font-common-base); 
    } 

    #photos { 
     /* Prevent vertical gaps */ 
     line-height: 0; 

     -webkit-column-count: 5; 
     -webkit-column-gap: 0px; 
     -moz-column-count: 5; 
     -moz-column-gap:  0px; 
     column-count:   5; 
     column-gap:   0px; 
    } 

    #photos img { 
     /* Just in case there are inline attributes */ 
     width: 100% !important; 
     height: auto !important; 
     margin-left: auto; 
     margin-right: auto; 
    } 

    @media (max-width: 1200px) { 
     #photos { 
      -moz-column-count: 5; 
      -webkit-column-count: 5; 
      column-count:   5; 
     } 
     #photos img { 
      /* Just in case there are inline attributes */ 
      max-width: width: 100% !important; 
     } 
    } 
    @media (max-width: 1000px) { 
     #photos { 
      -moz-column-count: 3; 
      -webkit-column-count: 3; 
      column-count:   3; 
     } 
    } 
    @media (max-width: 800px) { 
     #photos { 
      -moz-column-count: 2; 
      -webkit-column-count: 2; 
      column-count:   2; 
     } 
    } 
    @media (max-width: 400px) { 
     #photos { 
      -moz-column-count: 1; 
      -webkit-column-count: 1; 
      column-count:   1; 
     } 
    } 

編輯:這些文件是在服務器上100%,我刪除了它們,並重新上傳了所有!不知道爲什麼它沒有找到它們,因爲這些鏈接直接指向文件。

+1

你上傳了圖片嗎? –

回答

0

爲了使圖像在網絡上可見,需要在服務器上提供您提到的路徑文件...因此,基本上您需要確保這些圖像在服務器上可用。這應該解釋一切:http://www.htmlgoodies.com/primers/html/article.php/3478181

+0

是的,他們已經100%在服務器上了! – Alistairkb

+0

你如何發佈圖片存儲的屏幕截圖,併發布加載時設計網頁的外觀截圖。 – Deepak

0

我猜你所有的當前圖像都存儲在本地計算機上。

如果您無法上傳圖片,那麼您將無法看到它們!

在我建議複製正在使用的路徑,並複製整個文件夾。

因此,如果您有一個項目保存在本地,在您的計算機上,在一個文件夾中,然後上傳文件夾的整個內容到您的public_html文件夾。

您看到的小碎片圖像表明您的文件通常沒有找到。

希望你能解決它!

相關問題