خاصية امتداد الخط في CSS
مثال
اجعل النص في عناصر <div> أوسع:
div
{
font-family: sans-serif, "Helvetica Neue", "Lucida Grande", Arial;
font-stretch: expanded;
}
التعريف والاستخدام
تسمح font-stretch
لك الخاصية بجعل النص أضيق (مكثف) أو أعرض (موسع).
ملاحظة: توفر بعض الخطوط وجوهًا إضافية ؛ وجوه مكثفة ووجوه موسعة. بالنسبة لهذه الخطوط ، يمكنك استخدام font-stretch
الخاصية لتحديد وجه خط عادي أو مكثف أو موسع.
ملاحظة: هذه الخاصية ليس لها أي تأثير إذا كان الخط المحدد لا يوفر وجوهًا مكثفة أو ممتدة!
القيمة الافتراضية: | عادي |
---|---|
وارث: | نعم |
متحرك: | نعم. اقرأ عن animatable |
الإصدار: | CSS3 |
بناء جملة JavaScript: | الكائن .style.fontStretch = "تمدد" |
دعم المتصفح
تحدد الأرقام الواردة في الجدول إصدار المتصفح الأول الذي يدعم الخاصية بالكامل.
Property | |||||
---|---|---|---|---|---|
font-stretch | 48.0 | 9.0 | 9.0 | 11.0 | 35.0 |
بناء الجملة
font-stretch: ultra-condensed|extra-condensed|condensed|semi-condensed|normal|semi-expanded|expanded|extra-expanded|ultra-expanded|initial|inherit;
قيم الملكية
Value | Description |
---|---|
ultra-condensed | Makes the text as narrow as it gets |
extra-condensed | Makes the text narrower than condensed, but not as narrow as ultra-condensed |
condensed | Makes the text narrower than semi-condensed, but not as narrow as extra-condensed |
semi-condensed | Makes the text narrower than normal, but not as narrow as condensed |
normal | Default value. No font stretching |
semi-expanded | Makes the text wider than normal, but not as wide as expanded |
expanded | Makes the text wider than semi-expanded, but not as wide as extra-expanded |
extra-expanded | Makes the text wider than expanded, but not as wide as ultra-expanded |
ultra-expanded | Makes the text as wide as it gets |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |