html - 以当今现代方式使用 "caption"HTML 元素的最合适方式是什么?

标签 html css image templates caption

它们与 CSS 一起使用吗? (非表格?)

它们是如何使用的?

请举例说明。

最佳答案

CSS caption-side 属性用于指定标题相对于表格的位置(即表格上方或下方)。

Syntax:   caption-side: <value> Possible Values:  

* top
* bottom
* inherit

Initial Value: Top Applies to: Tables with a caption Inherited: Yes Media: Visual Example:

caption { caption-side: bottom;
width: auto; text-align: left; }

<style type="text/css">
caption {
  caption-side: bottom;
  width: auto;
  text-align: left;
  }
</style>
<table border="1">
  <caption>This is the caption</caption>
  <tr>
    <td>Try changing the values to see the effect it has on the position of the caption.</td>
  </tr>
  <tr>
    <td><b>Note:</b> If this is not working, your browser might not support the caption-side property. At the time of writing, browser support for the caption-side property was limited.</td>
  </tr>
</table>

关于html - 以当今现代方式使用 "caption"HTML 元素的最合适方式是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4171603/

相关文章:

python - 将图像上传到 Google App Engine 并与用户共享图像

php - 如何在浏览器中模拟命令行界面滚动? (始终在屏幕上保持最新的输出)

internet-explorer-8 - 替代 background-size 属性以在 IE8 中使用

image - 在fabric js中更改png图像颜色

twitter-bootstrap - 无法使用 Bootstrap 创建 html View

html - Perl Catalyst - 防止 url 中的双路径,例如。 HTTP ://mydomainname/login/login

css - 使文本跳到下面的图像而不是在移动设备上换行

javascript - 在同一个 HTML/Angular 页面上有两个时间选择器

javascript - 褪色文本对 Google 搜索的影响如何运作?

javascript - Bootstrap 中输入的必需属性不起作用