锚图像源无法显示的问题

时间:2011-05-08 20:01:14

标签: css html5 image article

我看不出为什么<a>上的图片没有显示。我做错了什么?

<section class="group">
    <section id="projects" class="module">
        <h1 class="">To help you decide</h1>
        <article>
            <div class="portfolio-item">
                <a href="#"><img src="images/work-sample1.jpg" alt="" /></a>
                <p class="btn"><a href="#">See more</a></p>
            </div>
            <div class="portfolio-item">
                <a href="#"><img src="images/work-sample2.jpg" alt="" /></a>
                <p class="btn"><a href="#">See more</a></p>
            </div>
            <div class="portfolio-item">
                <a href="#"><img src="images/work-sample3.jpg" alt="" /></a>
                <p class="btn"><a href="#">See more</a></p>
            </div>
        </article>
    </section><!-- #projects -->

CSS

    #content .portfolio-item {
            width: 140px; 
            padding: 4px; 
            background: #eee; 
            text-align: center;
            float: left; 
            margin: 24px 7px 14px 7px;
            display: block;
            height: 80px;
    }
        #content .portfolio-item p.btn {
            margin: 0;
        }
        #content .portfolio-item p.btn a {
            display: block; width: 142px; height: 29px; padding: 7px 0 0 0;
            background: url();
            font-weight: bold; text-align: center; text-transform: uppercase;
            text-decoration: none;
        }

1 个答案:

答案 0 :(得分:1)

好像你的网址错了。 它对我有用:http://jsfiddle.net/seler/NJxYx/