2.5 KiB
title | localeTitle |
---|---|
Text | نص |
نص
يتم توفير العديد من الخصائص بواسطة CSS لتغيير شكل ومظهر النص. يتم شرح خصائص النص المختلفة أدناه.
لون الخط
`` `أتش تي أم أل
هذا مثال على خاصية نص CSS.
``` css p { color:red; }
في المثال أعلاه ، يتغير color
النص الخاص بالعنصر <p>
إلى اللون الأحمر. يمكنك أيضًا تحديد اللون كقيم RGB وقيم HLS ورموز سداسية عشرية (لمزيد من المعلومات حول الألوان ، انقر هنا ).
محاذاة النص
text-align
يستخدم خاصية لتحديد المحاذاة الأفقية من النص. يمكن أن يأخذ القيم إلى left
، right
، center
، justify
. `` `المغلق ص { محاذاة النص: مركز؛ }
``Here the text is aligned to the center
(example).When text-align
is set to justify
,each line is stretched so that every line has equal width, and the left and right margins are straight (example).
Text Decoration
``
المغلق ص { زخرفة النص: تسطير؛ }
``The text-decoration
property is used to set or remove decorations from text. The value text-decoration: none;
is often used to remove underlines from links. Other text-decorations
include overline
,line-through
,and underline
(example).
Text Tranformation
``
المغلق ص { تحويل النص: الاستفادة }
``The text-transform
property is used to convert the entire text to uppercase
,lowercase
or to capitilize
each word(example).
Letter Spacing
The letter-spacing
property sets the space between characters in a text.
``
المغلق ص { تباعد حروف: 5px؛ }
``#### Line Height
The line-height
property sets the space between two lines of text.
``
المغلق ص { خط الطول: 5px؛ }
``#### Word Spacing
The word-spacing
sets the space between words in a text.
``
المغلق ص { تباعد الكلمات: 5px؛ } `` `