twitter-bootstrap Bootstrap 缩略图列表未显示缩略图

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14862758/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 16:22:02  来源:igfitidea点击:

Bootstrap thumbnail list is not showing thumbnails

htmltwitter-bootstrapthumbnailsimage

提问by Mike

I am using twitter bootstrap on a theme I downloaded, and my custom html in my bootstrap thumbnails list is showing but the images are not.

我在下载的主题上使用 twitter bootstrap,并且我的引导缩略图列表中的自定义 html 正在显示,但图像没有显示。

Investigating the code, shows the image tag and working image locations are there. Here is a picture of what is occurring:

调查代码,显示图像标签和工作图像位置在那里。这是正在发生的事情的图片:

enter image description here

在此处输入图片说明

The code for my thumbnail list is this:

我的缩略图列表的代码是这样的:

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

Lastly there are zero errors showing in the chrome inspect element, and I dont have any inline css on this page.

最后,在 chrome 检查元素中显示零错误,并且我在此页面上没有任何内联 css。

回答by Archimedes Trajano

data-srcis used to get a place holder image in the bootstrap examples. Just use src

data-src用于在引导程序示例中获取占位符图像。只需使用src