انجمن یاران منتظر
عنوان موضوع ::: آموزش CSS، جلسه ششم:: (تنظیمات متن)
نویسنده :سپیده 313



000080;">006666;"> آموزش CSS، جلسه ششم 


008000;"> Text color (رنگ متن)
000080;">مشخصه 9900ff;">color 000080;">برای تنظیم رنگ متن بکار می رود.


000080;"><html>
000080;"><head>
800080;"><style>
800080;">body {color:purple;}
800080;">h1 { color009900;}
800080;">p.ex { color:rgb(0,0,255);}
800080;"></style>
000080;"></head>
 
000080;"><body>
000080;"><h1>This is heading 1</h1>
000080;"><p>This is an ordinary paragraph. Notice that this text is purple. The default text-color for a page is defined in the body selector.</p>
000080;"><p class="ex">This is a paragraph with class="ex". This text is blue.</p>
000080;"></body>
000080;"></html>

000080;">
 


008000;">ترازبندی متن
000080;">همچنین می توانید برای ترازبندی متن از مشخصه 9900ff;">text-align000080;"> استفاده نمایید و آن را به صورت وسط چین(center) ، راست چین(right) ، چپ چین (left) که البته بطور پیش فرض این مقدار درنظر گرفته شده و یا justify تنظیم نمایید.
 
 
000080;"><html>
000080;"><head>
800080;"><style>
800080;">h1 {text-align:center;}
800080;">p.date {text-align:right;}
800080;">p.main {text-align:justify;}
800080;"></style>
000080;"></head>
 
000080;"><body>
000080;"><h1>CSS text-align Example</h1>
000080;"><p class="date">May, 2009</p>
000080;"><p class="main">In my younger and more vulnerable years my father gave me some advice that I've been turning over in my mind ever since. 'Whenever you feel like criticizing anyone,' he told me, 
000080;">'just remember that all the people in this world haven't had the advantages that you've had.'</p>
000080;"><p><b>Note:</b> Resize the browser window to see how the value "justify" works.</p>
000080;"></body>
 
000080;"></html>

000080;">
 



008000;">Text transform
000080;">مشخصۀ 9900ff;">text-transform000080;"> برای تعیین بزرگی و کوچکی حروف بکار می رود.

008080;">Uppercase  000080;">: تمامی حروف، بزرگ نمایش داده می شوند.
008080;">Lowercase000080;">: تمامی حروف، کوچک نمایش داده می شوند.
008080;">Capitalize000080;">: حرف اول هرکلمه بزرگ و مابقی کوچک نمایش داده می شوند.


000080;"><html>
000080;"><head>
800080;"><style>
800080;">p.uppercase {text-transform:uppercase;}
800080;">p.lowercase {text-transform:lowercase;}
800080;">p.capitalize {text-transform:capitalize;}
800080;"></style>
000080;"></head>
 
000080;"><body>
000080;"><p class="uppercase">This is some text.</p>
000080;"><p class="lowercase">This is some text.</p>
000080;"><p class="capitalize">This is some text.</p>
000080;"></body>
000080;"></html>

000080;">