افکت های متن در CSS 3 - خاصیت text-justify
خاصیت text-justify :
از خاصیت text-justify برای تعیین نحوه چیدمان متن در زمانی که مقدار خاصیت text-align
آن بر روی مقدار justify تنظیم شده است ، استفاده می شود .
همانطور که در بخش آموزش CSS 2 و در قسمت خاصیت text-align
مشاهده کرده اید ، قرار دادن مقدار این خاصیت بر روی مقدار justify باعث می شود
تا نوشته از هر دو طرف راست و چپ تراز شود .
تنظیم خاصیت text-justify ، چیدمان نوشته را در این حالت تنظیم می کند .
نکته مهم : برای استفاده از این خاصیت ، حتما باید ابتدا مقدار
خاصیت text-align عنصر را بر روی مقدار justify تنظیم کرده باشید . در غیر اینصورت
این خاصیت کار نخواهد کرد .
شکل کلی استفاده از این خاصیت به صورت زیر است :
|
Syntax
|
text-justify : value ;
مثال : text-justify : auto;
|
|
توضیح
|
تعیین کننده نحوه چیدمان نوشته در خاصیت text-justify است و می تواند یکی از مقادیر
زیر را داشته باشد :
- auto : در این حالت مرورگر به صورت خودکار نحوه چیدمان نوشته
را تعیین می کند .
- inter-word : در این حالت مرورگر برای تنظیم چیدمان نوشته فاصله
بین حروف را کم یا زیاد می کند .
- inter-ideograph : در این حالت نوشته با استفاده از متن ideograph
چیدمانش تنظیم می شود . در مثال های عملی این حالت را نمایش داده ایم .
- inter-cluster : . در مثال های عملی این حالت را نمایش داده
ایم . این مقدار برای زبان های آسیایی کار نمی کند .
- none : . در این حالت خاصیت text-justify غیر فعال می شود .
|
پشتیانی در مرورگر های مختلف :
این خاصیت در تمام مرورگر های مطرح پشتیبانی می شود . مرورگر IE از نسخه 9 به بعد ،
مرورگر فایرفاکس از نسخه 4 به بعد و مرورگر های کروم و اپرا نیز از این خاصیت پشتیبانی
می کنند .
مثال های عملی :
در مثال های عملی زیر سعی می کنیم تا مطالب ارائه شده را در عمل به شما نمایش دهیم
. خروجی چهار حالت اول جدول توضیح syntax را به ترتیب در مثال ها نشان داده ایم .
مثال 1 : حالت auto :
< div style = " text-align : justify ; text-justify
: auto ; width : 400px ; border : solid 1px black ">
in developerstudio.ir we are trying to teach every thing you may need
for web design
amd programming . some lanuages include asp.net , html , javascript
and css is described
in this site and new thigns every day is added .
  in every section , first we introduce a subject , then try to declare
  the syntax for usage . after that we show the subject in action with
real examples
  , that are exucted by native browser . in constrution of this site
we are trying
  to use international resourses like msdn and w3schools .
< /div >
|
|
in developerstudio.ir we are trying to teach every thing you may need for web design
amd programming . some lanuages include asp.net , html , javascript and css is described
in this site and new thigns every day is added . in every section , first we introduce
a subject , then try to declare the syntax for usage . after that we show the subject
in action with real examples , that are exucted by native browser . in constrution
of this site we are trying to use international resourses like msdn and w3schools
.
|
مثال 2 : حالت inter-word :
< div style = " text-align : justify ; text-justify
: inter-word ; width : 400px ; border : solid 1px black ">
in developerstudio.ir we are trying to teach every thing you may need
for web design
amd programming . some lanuages include asp.net , html , javascript
and css is described
in this site and new thigns every day is added .
  in every section , first we introduce a subject , then try to declare
  the syntax for usage . after that we show the subject in action with
real examples
  , that are exucted by native browser . in constrution of this site
we are trying
  to use international resourses like msdn and w3schools .
< /div >
|
|
in developerstudio.ir we are trying to teach every thing you may need for web design
amd programming . some lanuages include asp.net , html , javascript and css is described
in this site and new thigns every day is added . in every section , first we introduce
a subject , then try to declare the syntax for usage . after that we show the subject
in action with real examples , that are exucted by native browser . in constrution
of this site we are trying to use international resourses like msdn and w3schools
.
|
مثال 3 : حالت inter-ideograph :
< div style = " text-align : justify ; text-justify
: inter-ideograph ; width : 400px ; border : solid 1px black ">
in developerstudio.ir we are trying to teach every thing you may need
for web design
amd programming . some lanuages include asp.net , html , javascript
and css is described
in this site and new thigns every day is added .
  in every section , first we introduce a subject , then try to declare
  the syntax for usage . after that we show the subject in action with
real examples
  , that are exucted by native browser . in constrution of this site
we are trying
  to use international resourses like msdn and w3schools .
< /div >
|
|
in developerstudio.ir we are trying to teach every thing you may need for web design
amd programming . some lanuages include asp.net , html , javascript and css is described
in this site and new thigns every day is added . in every section , first we introduce
a subject , then try to declare the syntax for usage . after that we show the subject
in action with real examples , that are exucted by native browser . in constrution
of this site we are trying to use international resourses like msdn and w3schools
.
|
مثال 4 : حالت inter-cluster :
< div style = " text-align : justify ; text-justify
: inter-cluster ; width : 400px ; border : solid 1px black ">
in developerstudio.ir we are trying to teach every thing you may need
for web design
amd programming . some lanuages include asp.net , html , javascript
and css is described
in this site and new thigns every day is added .
  in every section , first we introduce a subject , then try to declare
  the syntax for usage . after that we show the subject in action with
real examples
  , that are exucted by native browser . in constrution of this site
we are trying
  to use international resourses like msdn and w3schools .
< /div >
|
|
in developerstudio.ir we are trying to teach every thing you may need for web design
amd programming . some lanuages include asp.net , html , javascript and css is described
in this site and new thigns every day is added . in every section , first we introduce
a subject , then try to declare the syntax for usage . after that we show the subject
in action with real examples , that are exucted by native browser . in constrution
of this site we are trying to use international resourses like msdn and w3schools
.
|
راجع این مطلب
سوال یا اشکالی دارید ؟! آن را در انجمن سایت مطرح نمایید ...
>>>>> ورود به انجمن تخصصی
نظر خودتان درباره این صفحه را با ما در میان بگذارید :