CSS ﻦﺘﻣ ﻪﻠﺻﺎﻓ ﻭ ﯽﮕﺘﻓﺭﻮﺗ


فهرست مطالب

    نمایش فهرست مطالب


ﻦﺘﻣ ﻪﻠﺻﺎﻓ

:ﺪﺷ ﺪﯿﻫﺍﻮﺧ ﺎﻨﺷﺁ ﺮﯾﺯ ﺹﺍﻮﺧ ﺎﺑ ﻞﺼﻓ ﻦﯾﺍ ﺭﺩ

  • text-indent
  • letter-spacing
  • line-height
  • word-spacing
  • white-space

ﻦﺘﻣ ﯽﮕﺘﻓﺭﻮﺗ

:ﺩﻮﺷ ﯽﻣ ﻩﺩﺎﻔﺘﺳﺍ ﻦﺘﻣ ﮏﯾ ﻝﻭﺍ ﻂﺧ ﯽﮕﺘﻓﺭﻮﺗ ﻦﯿﯿﻌﺗ ﯼﺍﺮﺑ tex

ﻝﺎﺜﻣ

p {
  text-indent: 50px;
}

→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ

<!DOCTYPE html>
<html>
<head>
<style>
p {
  text-indent: 50px;
}
</style>
</head>
<body>

<h1>Using text-indent</h1>

<p>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, 'just remember that all the people in this world haven't had the advantages that you've had.'</p>

</body>
</html>



ﻑﻭﺮﺣ ﻦﯿﺑ ﻪﻠﺻﺎﻓ

.ﺩﻮﺷ ﯽﻣ ﻩﺩﺎﻔﺘﺳﺍ ﻦﺘﻣ ﮏﯾ ﺭﺩ ﺎﻫﺮﺘﮐﺍﺭﺎﮐ ﻦﯿﺑ ﻪﻠﺻﺎﻓ ﻦﯿﯿﻌﺗ ﯼﺍﺮﺑ ﻑﻭﺮﺣ ﻦﯿﺑ ﻪﻠﺻﺎﻓ

:ﺪﻫﺩ ﯽﻣ ﻥﺎﺸﻧ ﺍﺭ ﺎﻫﺮﺘﮐﺍﺭﺎﮐ ﻦﯿﺑ ﻪﻠﺻﺎﻓ ﺶﻫﺎﮐ ﺎﯾ ﺶﯾﺍﺰﻓﺍ ﻩﻮﺤﻧ ﺮﯾﺯ ﻝﺎﺜﻣ

ﻝﺎﺜﻣ

h1 {
  letter-spacing: 5px;
}
h2 {
  letter-spacing: -2px;
}

→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ

<!DOCTYPE html>
<html>
<head>
<style>
h2 {
  letter-spacing: 5px;
}

h3 {
  letter-spacing: -2px;
}
</style>
</head>
<body>

<h1>Using letter-spacing</h1>

<h2>This is heading 1</h2>
<h3>This is heading 2</h3>

</body>
</html>



ﻂﺧ ﻉﺎﻔﺗﺭﺍ

:ﺩﻮﺷ ﯽﻣ ﻩﺩﺎﻔﺘﺳﺍ ﻁﻮﻄﺧ ﻦﯿﺑ ﻪﻠﺻﺎﻓ ﻦﯿﯿﻌﺗ ﯼﺍﺮﺑ line-heigh

ﻝﺎﺜﻣ

p.small {
  line-height: 0.8;
}
p.big {
  
line-height: 1.8;
}

→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ

<!DOCTYPE html>
<html>
<head>
<style>
p.small {
  line-height: 0.7;
}

p.big {
  line-height: 1.8;
}
</style>
</head>
<body>

<h1>Using line-height</h1>

<p>
This is a paragraph with a standard line-height.<br>
The default line height in most browsers is about 110% to 120%.<br>
</p>

<p class="small">
This is a paragraph with a smaller line-height.<br>
This is a paragraph with a smaller line-height.<br>
</p>

<p class="big">
This is a paragraph with a bigger line-height.<br>
This is a paragraph with a bigger line-height.<br>
</p>

</body>
</html>




ﺕﺎﻤﻠﮐ ﻪﻠﺻﺎﻓ

ﻦﯿﺑ ﻪﻠﺻﺎﻓ ﻦﯿﯿﻌﺗ ﯼﺍﺮﺑ ﺕﺎﻤﻠﮐ ﻦﯿﺑ ﻪﻠﺻﺎﻓ<"code class="w3-codespan> ﯽﮔﮋﯾﻭ

ﺪﻫﺩ ﯽﻣ ﻥﺎﺸﻧ ﺍﺭ ﻦﯿﺑ ﯼﺎﻀﻓ ﺶﻫﺎﮐ ﺎﯾ ﺶﯾﺍﺰﻓﺍ ﻩﻮﺤﻧ ﺮﯾﺯ ﻝﺎﺜﻣ

ﻝﺎﺜﻣ

 p.one {
  word-spacing: 10px;
}
p.two {
  word-spacing: -2px;
}

→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ

<!DOCTYPE html>
<html>
<head>
<style>
p.one {
  word-spacing: 10px;
}

p.two {
  word-spacing: -2px;
}
</style>
</head>
<body>

<h1>Using word-spacing</h1>

<p>This is a paragraph with normal word spacing.</p>

<p class="one">This is a paragraph with larger word spacing.</p>

<p class="two">This is a paragraph with smaller word spacing.</p>

</body>
</html>



ﺪﯿﻔﺳ ﯼﺎﻀﻓ

.ﺪﻨﮐ ﯽﻣ ﺺﺨﺸﻣ ﺍﺭ ﺮﺼﻨﻋ ﮏﯾ ﺭﺩ ﺪﯿﻔﺳ ﯼﺎﻀﻓ ﺖﯾﺮﯾﺪﻣ ﻩﻮﺤﻧ whi

:ﺪﻫﺩ ﯽﻣ ﻥﺎﺸﻧ ﺍﺭ ﺮﺼﻨﻋ ﮏﯾ ﺭﺩ ﻦﺘﻣ ﯼﺪﻨﺑ ﻪﺘﺴﺑ ﻥﺩﺮﮐ ﻝﺎﻌﻓﺮﯿﻏ ﻩﻮﺤﻧ ﻝﺎﺜﻣ ﻦﯾﺍ

ﻝﺎﺜﻣ

 p {
  white-space: nowrap;
}

→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ

<!DOCTYPE html>
<html>
<head>
<style>
p {
  white-space: nowrap;
}
</style>
</head>
<body>

<h1>Using white-space</h1>

<p>
This is some text that will not wrap.
This is some text that will not wrap.
This is some text that will not wrap.
This is some text that will not wrap.
This is some text that will not wrap.
This is some text that will not wrap.
This is some text that will not wrap.
This is some text that will not wrap.
This is some text that will not wrap.
</p>

<p>Try to remove the white-space property to see the difference!</p>

</body>
</html>



CSS Text Spacing ﯼﺎﻫ ﯽﮔﮋﯾﻭ

letter-spacing

ﺪﻨﮐ ﯽﻣ ﺺﺨﺸﻣ ﻦﺘﻣ ﮏﯾ ﺭﺩ ﺍﺭ ﺎﻫﺮﺘﮐﺍﺭﺎﮐ ﻦﯿﺑ ﯼﺎﻀﻓ

line-height

ﺪﻨﮐ ﯽﻣ ﺺﺨﺸﻣ ﺍﺭ ﻂﺧ ﻉﺎﻔﺗﺭﺍ

text-indent

ﺪﻨﮐ ﯽﻣ ﺺﺨﺸﻣ ﯽﻨﺘﻣ ﮎﻮﻠﺑ ﮏﯾ ﺭﺩ ﺍﺭ ﻝﻭﺍ ﻂﺧ ﯽﮕﺘﻓﺭﻮﺗ

white-space

ﺪﻨﮐ ﯽﻣ ﺺﺨﺸﻣ ﺍﺭ ﺮﺼﻨﻋ ﮏﯾ ﻞﺧﺍﺩ ﺭﺩ ﺪﯿﻔﺳ ﯼﺎﻀﻓ ﺖﯾﺮﯾﺪﻣ ﻩﻮﺤﻧ

word-spacing

ﺪﻨﮐ ﯽﻣ ﺺﺨﺸﻣ ﺍﺭ ﻦﺘﻣ ﮏﯾ ﺕﺎﻤﻠﮐ ﻦﯿﺑ ﻪﻠﺻﺎﻓ

تمامی حقوق محفوظ است. © BasicIT.org • 2023-2024