الفرق بين المراجعتين لصفحة: «CSS/caption-side»
< CSS
لا ملخص تعديل |
ط استبدال النص - '\[\[تصنيف:(.*)\]\]' ب'{{SUBPAGENAME}}' |
||
| سطر 97: | سطر 97: | ||
* مسودة [https://drafts.csswg.org/css-logical-props/#caption-side CSS Logical Properties Level 1]. | * مسودة [https://drafts.csswg.org/css-logical-props/#caption-side CSS Logical Properties Level 1]. | ||
* مواصفة [http://www.w3.org/TR/CSS2/tables.html#caption-position CSS Level 2 (Revision 1)]. | * مواصفة [http://www.w3.org/TR/CSS2/tables.html#caption-position CSS Level 2 (Revision 1)]. | ||
[[تصنيف:CSS]] | [[تصنيف:CSS|{{SUBPAGENAME}}]] | ||
[[تصنيف:CSS Property]] | [[تصنيف:CSS Property|{{SUBPAGENAME}}]] | ||
[[تصنيف:CSS Table]] | [[تصنيف:CSS Table|{{SUBPAGENAME}}]] | ||
مراجعة 15:41، 28 يناير 2018
الخاصية caption-side في CSS تُحدِّد موضع لافتة الجدول المُعرَّفة عبر العنصر <caption>.
/* كلمات محجوزة */
caption-side: top;
caption-side: bottom;
/* القيم العامة */
caption-side: inherit;
caption-side: initial;
caption-side: unset;
| القيمة الابتدائية | top
|
|---|---|
| تُطبَّق على | العنصر <caption>.
|
| قابلة للوراثة | نعم |
| قابلة للحركة | لا |
| القيمة المحسوبة | كما حُدِّدَت. |
أمثلة
سنستخدم في المثال الآتي جدولين <table> مع لافتةٍ <caption> لكل واحدٍ منهما، ثم سنستعمل الخاصية caption-side لضبط موضع اللافتة:
<table class="top">
<caption>Caption ABOVE the table</caption>
<tr>
<td>Some data</td>
<td>Some more data</td>
</tr>
</table>
<br>
<table class="bottom">
<caption>Caption BELOW the table</caption>
<tr>
<td>Some data</td>
<td>Some more data</td>
</tr>
</table>
شيفرة CSS:
.top caption {
caption-side: top;
}
.bottom caption {
caption-side: bottom;
}
table {
border: 1px solid gray;
padding: .25em;
}
td {
border: 1px solid cadetblue;
padding: .1em;
}
دعم المتصفحات
| الميزة | Chrome | Firefox | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| الدعم الأساسي | 1.0 | 1.0 | 8.0 | 4.0 | 1.0 |
البنية العامة
الخاصية caption-side تقبل إحدى الكلمتين المحجوزتين التاليتين.
القيمة top
يجب عرض لافتة الجدول <caption> فوق الجدول.
القيمة bottom
يجب عرض لافتة الجدول <caption> تحت الجدول.
البنية الرسمية
caption-side: top | bottom;
مصادر ومواصفات
- مسودة CSS Logical Properties Level 1.
- مواصفة CSS Level 2 (Revision 1).