2013-02-13 95 views
11

我對我下載的主題使用了twitter引導程序,並且我的自舉縮略圖列表中顯示了自定義html,但圖像不是。Bootstrap縮略圖列表未顯示縮略圖

調查代碼,顯示圖像標記和工作圖像的位置在那裏。這裏是正在發生的一個畫面:

enter image description here

爲我的縮略圖列表中的代碼是這樣的:

<div class="span9 space"><ul class="thumbnails"><li class="span3"> 
         <div class="thumbnail"> 
          <img data-src="http://s3.amazonaws.com/brewerydbapi/beer/YAKFea/upload_1CxY2l-medium.png" alt=""> 
          <h3>90 Shilling</h3> 
          <p>Odell Brewing Company</p> 
         </div> 
        </li><li class="span3"> 
         <div class="thumbnail"> 
          <img data-src="http://s3.amazonaws.com/brewerydbapi/beer/oeGSxs/upload_FiPLQC-medium.png" alt=""> 
          <h3>Naughty 90</h3> 
          <p>Toppling Goliath Brewing Company</p> 
         </div> 
        </li><li class="span3"> 
         <div class="thumbnail"> 
          <img data-src="noImage.gif" alt=""> 
          <h3>90-Shilling Scotch Ale</h3> 
          <p>Taps Fish House & Brewery</p> 
         </div> 
        </li><li class="span3"> 
         <div class="thumbnail"> 
          <img data-src="noImage.gif" alt=""> 
          <h3>Williams Ceilidh 90</h3> 
          <p>Williams Brothers Brewing Company</p> 
         </div> 
        </li><li class="span3"> 
         <div class="thumbnail"> 
          <img data-src="noImage.gif" alt=""> 
          <h3>Boscos 90 Shilling Ale</h3> 
          <p>Boscos Brewing Company</p> 
         </div> 
        </li><li class="span3"> 
         <div class="thumbnail"> 
          <img data-src="noImage.gif" alt=""> 
          <h3>Dundee Export 90 Scotch Ale</h3> 
          <p>Dundee Brewing Co.</p> 
         </div> 
        </li><li class="span3"> 
         <div class="thumbnail"> 
          <img data-src="https://s3.amazonaws.com/brewerydbapi/beer/qqTzHb/upload_mGIvsJ-medium.png" alt=""> 
          <h3>90 Minute IPA</h3> 
          <p>Dogfish Head Craft Brewery</p> 
         </div> 
        </li><li class="span3"> 
         <div class="thumbnail"> 
          <img data-src="http://s3.amazonaws.com/brewerydbapi/beer/jdQySZ/upload_jbcADO-medium.png" alt=""> 
          <h3>I-90 India Pale Ale</h3> 
          <p>Ancient Lakes Brewing Company</p> 
         </div> 
        </li></ul>      

      </div> 

最後有數字顯示在Chrome檢查元素零個錯誤,我沒有任何內聯CSS在此頁面上。

+2

而不是您的圖像標籤上的數據-SRC試試看src。 – 2013-02-13 20:53:40

+0

這裏是一個地面零小提琴:http://jsfiddle.net/BZudQ/使用'src'確實有效,但我不知道爲什麼。 – isherwood 2013-02-13 20:56:49

+1

更新小提琴顯示工作形象:http://jsfiddle.net/BZudQ/1/ – isherwood 2013-02-13 20:59:20

回答

24

data-src用於在引導示例中獲取佔位符圖像。只需使用src

+0

在批准太小編輯之前,請仔細檢查:) – bonCodigo 2014-02-27 16:01:12

+1

令人難以置信,謝謝! ;) – Roman 2014-11-17 10:43:03

+1

爲什麼''有效,但不是像''這樣的本地圖像?圖像在其他地方可見! – BentCoder 2014-11-25 23:01:33