top:它指定将表标题放在表的顶部。它是默认值。
用法:
caption-side:top;
例:
caption-side property.geeks {
caption-side:top;
}
GeeksForGeeks
caption-side:top:
Student Name | Enroll_no. | Address |
---|---|---|
Hritik Bhatnagar | 234 | Delhi |
Govind madan | 235 | kolkata |
Suraj Roy | 236 | Mumbai |
Dhruv Mishra | 237 | Dehadun |
输出:
botttom:此属性指定将表标题放在表的底部。
用法:
caption-side:bottom;
例:
caption-side property.geeks {
caption-side:bottom;
}
GeeksForGeeks
caption-side:bottom:
Student Name | Enroll_no. | Address |
---|---|---|
Hritik Bhatnagar | 234 | Delhi |
Govind madan | 235 | kolkata |
Suraj Roy | 236 | Mumbai |
Dhruv Mishra | 237 | Dehadun |
输出:
initial:它将属性设置为其默认值。
用法:
captipn-side:initial
例:
.geeks{
caption-side:initial;
}
GeeksForGeeks
caption-side:initial:
Student Name | Enroll_no. | Address |
---|---|---|
Hritik Bhatnagar | 234 | Delhi |
Govind madan | 235 | kolkata |
Suraj Roy | 236 | Mumbai |
Dhruv Mishra | 237 | Dehadun |
输出: