HTML5 <figure> 在我的例子中的用法

标签 html figure

这种情况我该怎么办:

        <figure>
            <a href="#" class="portfolio-item">
                <div class="picture"><img src="images/portfolio/recent-01.jpg" alt=""/><div class="image-overlay-link"></div></div>
                <figcaption class="item-description">
                    <h5>Mountain Landscapes</h5>
                    <span>Photography</span>
                </figcaption>
            </a>
        </figure>

我无法在“a”元素之外使用“figcaption”,但我想将鼠标悬停在文本区域和图像上。也许“文章”会更好?

最佳答案

为什么不使用a外部数字,如 suggested by Alohchi ?这是有效的:

<a href="#" class="portfolio-item">
    <figure>
        <div class="picture">
            <img src="images/portfolio/recent-01.jpg" alt=""/>
            <div class="image-overlay-link"></div>
        </div>
        <figcaption class="item-description">
            <h5>Mountain Landscapes</h5>
            <span>Photography</span>
        </figcaption>
    </figure>
</a>

关于HTML5 <figure> 在我的例子中的用法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13829796/

相关文章:

javascript - 在 Internet Explorer 中更改 css 后恢复 <select> 下拉样式/"arrow"

r - r 中的排列图

matlab - MATLAB 标题的不同部分使用不同的颜色

css - 有没有更好的方法将图形元素限制为所包含图像的大小

jquery - 我如何防止它向下推?

php - 如何将不同模型的两个不同 id 从 Controller 传递到 View

jquery - 在 html 页面中,文件 uploader 只接受 png

python - 与python的matplotlib图交互: assign value to selected features

matlab - 在Matlab中使用 "imhist"函数在同一个图形上绘制多个直方图

javascript - 在 d3 js 中切割底部圆弧的矩形