它们与 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/