ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
## caption-side 属性 ### 属性定义及使用说明 Tcaption-side 属性设置表格标题的位置。 JavaScript 语法:object.style.captionSide="bottom" * * * ## 属性值 | 值 | 描述 | | --- | --- | | top | 默认值。把表格标题定位在表格之上。 | | bottom | 把表格标题定位在表格之下。 | | inherit | 规定应该从父元素继承 caption-side 属性的值。 | * * * ## 实例--指定表格标题的位置: ``` <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>W3Cschool教程(w3cschool.cn)</title> <style> caption {caption-side:bottom;} </style> </head> <body> <table border="1"> <caption>Table 1.1 Customers</caption> <tr> <th>Company</th> <th>Contact</th> <th>Country</th> </tr> <tr> <td>Alfreds Futterkiste</td> <td>Maria Anders</td> <td>Germany</td> </tr> <tr> <td>Berglunds snabbköp</td> <td>Christina Berglund</td> <td>Sweden</td> </tr> <tr> <td>Centro comercial Moctezuma</td> <td>Francisco Chang</td> <td>Mexico</td> </tr> <tr> <td>Ernst Handel</td> <td>Roland Mendel</td> <td>Austria</td> </tr> <tr> <td>Island Trading</td> <td>Helen Bennett</td> <td>UK</td> </tr> <tr> <td>Magazzini Alimentari Riuniti</td> <td>Giovanni Rovelli</td> <td>Italy</td> </tr> <tr> <td>North/South</td> <td>Simon Crowther</td> <td>UK</td> </tr> </table> <p><b>Note:</b> IE8 supports the caption-side property if a !DOCTYPE is specified.</p> </body> </html> ```