CSS ﺮﺻﺎﻨﻋ ﻪﺒﺷ


فهرست مطالب

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


؟ﺖﺴﯿﭼ ﺮﺻﺎﻨﻋ ﻪﺒﺷ

.ﺩﻮﺷ ﯽﻣ ﻩﺩﺎﻔﺘﺳﺍ ﺮﺼﻨﻋ ﮏﯾ ﺯﺍ ﻩﺪﺷ ﺺﺨﺸﻣ ﯼﺎﻫ ﺶﺨﺑ ﻪﺑ ﻥﺩﺍﺩ ﻞﯾﺎﺘﺳﺍ ﯼﺍﺮﺑ CSS ﺮﺼﻨﻋ ﻪﺒﺷ ﮏ

:ﺩﺮﮐ ﻩﺩﺎﻔﺘﺳﺍ ﺮﯾﺯ ﺩﺭﺍﻮﻣ ﯼﺍﺮﺑ ﻥﺁ ﺯﺍ ﻥﺍﻮﺗ ﯽﻣ ،ﻝﺎﺜﻣ ﻥﺍﻮﻨﻋ ﻪﺑ

  • ﺪﯿﻨﮐ ﻞﯾﺎﺘﺳﺍ ﺍﺭ ﺮﺼﻨﻋ ﮏﯾ ﻂﺧ ﺎﯾ ﻑﺮﺣ ﻦﯿﻟﻭﺍ

  • ﺮﺼﻨﻋ ﮏﯾ ﯼﺍﻮﺘﺤﻣ ﺯﺍ ﺪﻌﺑ ﺎﯾ ﻞﺒﻗ ﺍﻮﺘﺤﻣ ﺝﺭﺩ


ﻮﺤﻧ

:ﻪﺒﺷ ﺮﺻﺎﻨﻋ ﻮﺤﻧ

selector::pseudo-element {
  property: value;
}

:: ﻝﻭﺍ ﻂﺧ ﻪﺒﺷ ﺮﺼﻨﻋ

ﺩﻮﺷ ﯽﻣ ﻩﺩﺎﻔﺘﺳﺍ ﺹﺎﺧ ﮏﺒﺳ ﮏﯾ ﻥﺩﻭﺰﻓﺍ ﯼﺍﺮﺑ ::first-line

ﺪﻨﮐ ﯽﻣ ﯼﺪﻨﺑ ﺐﻟﺎﻗ <p> ﻪﻤﻫ ﺭﺩ ﺍﺭ ﻦﺘﻣ ﻝﻭﺍ ﻂﺧ ﺮﯾﺯ ﻝﺎﺜﻣ

ﻝﺎﺜﻣ

p::first-line 
{
   
color: #ff0000;
   
font-variant: small-caps;
}

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

<!DOCTYPE html>
<html>
<head>
<style>
p::first-line {
  color: #ff0000;
  font-variant: small-caps;
}
</style>
</head>
<body>

<p>You can use the ::first-line pseudo-element to add a special effect to the first line of a text. Some more text. And even more, and more, and more, and more, and more, and more, and more, and more, and more, and more, and more, and more.</p>

</body>
</html>


ﻪﺟﻮﺗ: ﺮﺼﻨﻋ ﻪﺒﺷ ::first-line

ﺩﻮﺷ ﯽﻣ ﻝﺎﻤﻋﺍ ::first-line ﯼﺍﺮﺑ ﺮﯾﺯ ﯼﺎﻫ ﯽﮔﮋﯾﻭ

  • ﺖﻧﻮﻓ ﯼﺎﻫ ﯽﮔﮋﯾﻭ

  • ﮓﻧﺭ ﺹﺍﻮﺧ

  • ﻪﻨﯿﻣﺯ ﺲﭘ ﯼﺎﻫ ﯽﮔﮋﯾﻭ

  • ﺕﺎﻤﻠﮐ ﻪﻠﺻﺎﻓ

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

  • ﻦﯿﯾﺰﺗ-ﻦﺘﻣ

  • ﯼﺩﻮﻤﻋ ﺯﺍﺮﺗ

  • ﻦﺘﻣ ﻞﯾﺪﺒﺗ

  • ﻂﺧ ﻉﺎﻔﺗﺭﺍ

  • ﻦﺷﻭﺭ

ﺪﯿﻨﮐ ﻪﺟﻮﺗ ﯼﺍ ﻪﻄﻘﻧ ﻭﺩ ﺩﺎﻤﻧ ﻪﺑ - ::f



:: ﻝﻭﺍ ﻑﺮﺣ ﻪﺒﺷ ﺮﺼﻨﻋ

.ﺩﻮﺷ ﯽﻣ ﻩﺩﺎﻔﺘﺳﺍ ﯽﻟﻭﺍ ﻪﺑ ﺹﺎﺧ ﮏﺒﺳ ﮏﯾ ﻥﺩﻭﺰﻓﺍ ﯼﺍﺮﺑ ::fir

ﺪﻨﮐ ﯽﻣ ﺖﻣﺮﻓ <p> ﻪﻤﻫ ﺭﺩ ﺍﺭ ﻦﺘﻣ ﻝﻭﺍ ﻑﺮﺣ ﺮﯾﺯ ﻝﺎﺜﻣ

ﻝﺎﺜﻣ

p::first-letter 
{
   
color: #ff0000;
   
font-size: xx-large;
}

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

<!DOCTYPE html>
<html>
<head>
<style>
p::first-letter {
  color: #ff0000;
  font-size: xx-large;
}
</style>
</head>
<body>

<p>You can use the ::first-letter pseudo-element to add a special effect to the first character of a text!</p>

</body>
</html>


ﻪﺟﻮﺗ: ﺮﺼﻨﻋ ﻪﺒﺷ ::first-letter

:ﺩﻮﺷ ﯽﻣ ﻝﺎﻤﻋﺍ ﻪﺒﺷ ﻝﻭﺍ ﻑﺮﺣ :: ﺮﺼﻨﻋ ﯼﺍﺮﺑ ﺮﯾﺯ ﯼﺎﻫ ﯽﮔﮋﯾﻭ

  • ﺖﻧﻮﻓ ﯼﺎﻫ ﯽﮔﮋﯾﻭ

  • ﮓﻧﺭ ﺹﺍﻮﺧ

  • ﻪﻨﯿﻣﺯ ﺲﭘ ﯼﺎﻫ ﯽﮔﮋﯾﻭ

  • ﻪﯿﺷﺎﺣ ﯼﺎﻫ ﯽﮔﮋﯾﻭ

  • ﯽﮑﺘﺸﻟﺎﺑ ﺹﺍﻮﺧ

  • ﯼﺯﺮﻣ ﺹﺍﻮﺧ

  • ﻦﯿﯾﺰﺗ-ﻦﺘﻣ

  • (ﺪﺷﺎﺑ "ﭻﯿﻫ" "float" ﺮﮔﺍ ﻂﻘﻓ) ﻥﺩﺮﮐ ﺯﺍﺮﺗ-ﯼﺩﻮﻤﻋ

  • ﻦﺘﻣ ﻞﯾﺪﺒﺗ

  • ﻂﺧ ﻉﺎﻔﺗﺭﺍ

  • ﺭﻭﺎﻨﺷ

  • ﻦﺷﻭﺭ


HTML ﯼﺎﻫ ﺱﻼﮐ ﻭ ﺮﺻﺎﻨﻋ ﻪﺒﺷ

:ﺩﺮﮐ ﺐﯿﮐﺮﺗ HTML ﯼﺎﻫ ﺱﻼﮐ ﺎﺑ ﻥﺍﻮﺗ ﯽﻣ ﺍﺭ ﺮﺻﺎﻨﻋ ﻪﺒﺷ

ﻝﺎﺜﻣ

p.intro::first-letter {
  color: #ff0000;
  
font-size: 200%;
} 

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

<!DOCTYPE html>
<html>
<head>
<style>
p.intro::first-letter {
  color: #ff0000;
  font-size: 200%;
}  
</style>
</head>
<body>

<p class="intro">This is an introduction.</p>
<p>This is a paragraph with some text. A bit more text even.</p>

</body>
</html>


ﺪﻫﺩ ﯽﻣ ﺶﯾﺎﻤﻧ ﺭﺩ ،"class="intro ﺎﺑ ﺍﺭ ﺎﻫ ﻑﺍﺮﮔﺍﺭﺎﭘ ﻝﻭﺍ ﻑﺮﺣ ﻻﺎﺑ ﻝﺎﺜﻣ


ﻪﻧﺎﮔﺪﻨﭼ ﺮﺻﺎﻨﻋ ﻪﺒﺷ

.ﺩﺮﮐ ﺐﯿﮐﺮﺗ ﻢﻫ ﺎﺑ ﻥﺍﻮﺗ ﯽﻣ ﺰﯿﻧ ﺍﺭ ﺮﺼﻨﻋ ﻪﺒﺷ ﻦﯾﺪﻨﭼ

ﺩﻮﺑ ﺪﻫﺍﻮﺧ in ،ﺰﻣﺮﻗ ﻑﺍﺮﮔﺍﺭﺎﭘ ﮏﯾ ﻝﻭﺍ ﻑﺮﺣ ،ﺮﯾﺯ ﻝﺎﺜﻣ ﺭﺩ

ﻝﺎﺜﻣ

p::first-letter
{
  color: #ff0000;
  font-size: xx-large;
}

p::first-line 
{
   
color: #0000ff;
   
font-variant: small-caps;
}

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

<!DOCTYPE html>
<html>
<head>
<style>
p::first-letter {
  color: #ff0000;
  font-size: xx-large;
}

p::first-line {
  color: #0000ff;
  font-variant: small-caps;
}
</style>
</head>
<body>

<p>You can combine the ::first-letter and ::first-line pseudo-elements to add a special effect to the first letter and the first line of a text!</p>

</body>
</html>



CSS - ﺮﺼﻨﻋ ::before ﻪﺒﺷ

.ﺩﺮﮐ ﻩﺩﺎﻔﺘﺳﺍ ﺮﺼﻨﻋ ﮏﯾ ﯼﺍﻮﺘﺤﻣ ﺯﺍ ﻞﺒﻗ ﺍﻮﺘﺤﻣ ﯽﺧﺮﺑ ﺝﺭﺩ ﯼﺍﺮﺑ ﻥﺍﻮﺗ ﯽﻣ ﺍﺭ

:ﺪﻨﮐ ﯽﻣ ﺝﺭﺩ <h1> ﺮﺼﻨﻋ ﺮﻫ ﯼﺍﻮﺘﺤﻣ ﺯﺍ ﻞﺒﻗ ﺍﺭ ﺮﯾﻮﺼﺗ ﮏﯾ ﺮﯾﺯ ﻝﺎﺜﻣ

ﻝﺎﺜﻣ

h1::before 
{
  content: url(smiley.gif);
}

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

<!DOCTYPE html>
<html>
<head>
<style>
h1::before {
  content: url(smiley.gif);
}
</style>
</head>
<body>

<h1>This is a heading</h1>
<p>The ::before pseudo-element inserts content before the content of an element.</p>

<h1>This is a heading</h1>

</body>
</html>



CSS - ﺮﺼﻨﻋ ::after Pseudo-element

.ﺩﺮﮐ ﻩﺩﺎﻔﺘﺳﺍ ﺮﺼﻨﻋ ﮏﯾ ﯼﺍﻮﺘﺤﻣ ﺯﺍ ﺲﭘ ﺎﻫﺍﻮﺘﺤﻣ ﺯﺍ ﯽﺧﺮﺑ ﺝﺭﺩ ﯼﺍﺮﺑ ﻥﺍﻮﺗ ﯽﻣ ﺍﺭ

:ﺪﻨﮐ ﯽﻣ ﺝﺭﺩ <h1> ﺮﺼﻨﻋ ﺮﻫ ﯼﺍﻮﺘﺤﻣ ﺯﺍ ﺪﻌﺑ ﺍﺭ ﺮﯾﻮﺼﺗ ﮏﯾ ﺮﯾﺯ ﻝﺎﺜﻣ

ﻝﺎﺜﻣ

h1::after
{
  content: url(smiley.gif);
}

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

<!DOCTYPE html>
<html>
<head>
<style>
h1::after {
  content: url(smiley.gif);
}
</style>
</head>
<body>

<h1>This is a heading</h1>
<p>The ::after pseudo-element inserts content after the content of an element.</p>

<h1>This is a heading</h1>

</body>
</html>



CSS - ﺮﮕﻧﺎﺸﻧ ﻪﺒﺷ ﺮﺼﻨﻋ ::

::marker ﺮﺼﻨﻋ ﻪﺒﺷ

:ﺪﻨﮐ ﯽﻣ ﮏﺒﺳ ﺍﺭ ﺖﺴﯿﻟ ﯼﺎﻫ ﻢﺘﯾﺁ ﯼﺎﻫﺮﮕﻧﺎﺸﻧ ﺮﯾﺯ ﻝﺎﺜﻣ

ﻝﺎﺜﻣ

::marker { 
  color: red;
  font-size: 23px;
}

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

<!DOCTYPE html>
<html>
<head>
<style>
::marker { 
  color: red;
  font-size: 23px;
}
</style>
</head>
<body>

<ul>
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ul>

<ol>
  <li>First</li>
  <li>Second</li>
  <li>Third</li>
</ol>

</body>
</html>



CSS - :: ﺮﺼﻨﻋ ﻪﺒﺷ ﺏﺎﺨﺘﻧﺍ

ﺩﺭﺍﺩ ﺖﻘﺑﺎﻄﻣ ﺮﺼﻨﻋ ﮏﯾ ﺯﺍ ﯽﺸﺨﺑ ﺎﺑ ::selection ﺮﺼ

:ﺩﺮﮐ ﻝﺎﻤﻋﺍ ::selection ﯼﺍﺮﺑ ﻥﺍﻮﺗ ﯽﻣ ﺍﺭ ﺮﯾﺯ CS

:ﺪﻨﮐ ﯽﻣ ﺰﻣﺮﻗ ﺩﺭﺯ ﻪﻨﯿﻣﺯ ﺲﭘ ﯼﻭﺭ ﺍﺭ ﻩﺪﺷ ﺏﺎﺨﺘﻧﺍ ﻦﺘﻣ ﺮﯾﺯ ﻝﺎﺜﻣ

ﻝﺎﺜﻣ

::selection {
  color: red; 
  
background: yellow;
}

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

<!DOCTYPE html>
<html>
<head>
<style>
::selection {
  color: red;
  background: yellow;
}
</style>
</head>
<body>

<h1>Select some text on this page:</h1>

<p>This is a paragraph.</p>
<div>This is some text in a div element.</div>

</body>
</html>




CSS ﻪﺒﺷ ﺮﺻﺎﻨﻋ ﻪﻤﻫ

::after

ﻝﺎﺜﻣ

p::after

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﯿﻨﮐ ﺝﺭﺩ ﯼﺰﯿﭼ <p> ﺮﺼﻨﻋ ﺮﻫ ﯼﺍﻮﺘﺤﻣ ﺯﺍ ﺪﻌﺑ

::before

ﻝﺎﺜﻣ

p::before

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﯿﻨﮐ ﺩﺭﺍﻭ ﺍﺭ ﯼﺰﯿﭼ <p> ﺮﺼﻨﻋ ﺮﻫ ﯼﺍﻮﺘﺤﻣ ﺯﺍ ﻞﺒﻗ

::first-letter

ﻝﺎﺜﻣ

p::first-letter

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ﺍﺭ <p> ﺮﺼﻨﻋ ﺮﻫ ﻝﻭﺍ ﻑﺮﺣ

::first-line

ﻝﺎﺜﻣ

p::first-line

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ﺍﺭ <p> ﺮﺼﻨﻋ ﺮﻫ ﻝﻭﺍ ﻂﺧ

::marker

ﻝﺎﺜﻣ

::marker

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ﺍﺭ ﺖﺳﺮﻬﻓ ﺩﺭﺍﻮﻣ ﯼﺎﻫﺮﮕﻧﺎﺸﻧ

::selection

ﻝﺎﺜﻣ

p::selection

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺖﺳﺍ ﻩﺪﺷ ﺏﺎﺨﺘﻧﺍ ﺮﺑﺭﺎﮐ ﻂﺳﻮﺗ ﻪﮐ ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ﺍﺭ ﺮﺼﻨﻋ ﮏﯾ ﺯﺍ ﯽﺸﺨﺑ

CSS ﻪﺒﺷ ﯼﺎﻫ ﺱﻼﮐ ﻡﺎﻤﺗ

:active

ﻝﺎﺜﻣ

a:active

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ﺍﺭ ﻝﺎﻌﻓ ﮏﻨﯿﻟ

:checked

ﻝﺎﺜﻣ

input:checked

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ﺍﺭ ﻩﺩﺯ ﺖﻣﻼﻋ <ﯼﺩﻭﺭﻭ> ﺮﺼﻨﻋ ﺮﻫ

:disabled

ﻝﺎﺜﻣ

input:disabled

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ﺍﺭ ﻝﺎﻌﻓﺮﯿﻏ <ﯼﺩﻭﺭﻭ> ﺮﺼﻨﻋ ﺮﻫ

:empty

ﻝﺎﺜﻣ

p:empty

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ﺩﺭﺍﺪﻧ ﺪﻧﺯﺮﻓ ﻪﮐ ﺍﺭ <p> ﺮﺼﻨﻋ ﺮﻫ

:enabled

ﻝﺎﺜﻣ

input:enabled

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ﺍﺭ ﻝﺎﻌﻓ <ﯼﺩﻭﺭﻭ> ﺮﺼﻨﻋ ﺮﻫ

:first-child

ﻝﺎﺜﻣ

p:first-child

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ﺖﺳﺍ ﻥﺁ ﺪﻟﺍﻭ ﻝﻭﺍ ﺪﻧﺯﺮﻓ ﻪﮐ ﺍﺭ <p> ﺮﺼﻨﻋ ﺮﻫ

:first-of-type

ﻝﺎﺜﻣ

p:first-of-type

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ،ﺖﺳﺍ ﻥﺁ ﺪﻟﺍﻭ <p> ﺮﺼﻨﻋ ﻦﯿﻟﻭﺍ ﻪﮐ ﺍﺭ <p> ﺮﺼﻨﻋ ﺮﻫ

:focus

ﻝﺎﺜﻣ

input:focus

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ﺩﺭﺍﺩ ﺱﻮﮐﻮﻓ ﻪﮐ ﺍﺭ <input> ﺮﺼﻨﻋ

:hover

ﻝﺎﺜﻣ

a:hover

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ﺱﻭﺎﻣ ﯼﻭﺭ ﺍﺭ ﺎﻫﺪﻧﻮﯿﭘ

:in-range

ﻝﺎﺜﻣ

input:in-range

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ﺺﺨﺸﻣ ﻩﺩﻭﺪﺤﻣ ﺭﺩ ﯼﺭﺍﺪﻘﻣ ﺎﺑ ﺍﺭ <input> ﺮﺻﺎﻨﻋ

:invalid

ﻝﺎﺜﻣ

input:invalid

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ﺮﺒﺘﻌﻣﺎﻧ ﺭﺍﺪﻘﻣ ﺎﺑ ﺍﺭ <input> ﺮﺻﺎﻨﻋ ﻪﻤﻫ

:lang(language)

ﻝﺎﺜﻣ

p:lang(it)

ﻝﺎﺜﻣ ﺡﺮﺷ

.ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ،ﺩﻮﺷ ﯽﻣ ﻉﻭﺮﺷ "it" ﺎﺑ ﻪﮐ lang ﻪﺼﺨﺸﻣ ﺭﺍﺪﻘﻣ ﺎﺑ ﺍﺭ <p> ﺮﺼﻨﻋ ﺮﻫ

:last-child

ﻝﺎﺜﻣ

p:last-child

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ﺖﺳﺍ ﻥﺁ ﺪﻟﺍﻭ ﺪﻧﺯﺮﻓ ﻦﯾﺮﺧﺁ ﻪﮐ ﺍﺭ <p> ﺮﺼﻨﻋ ﺮﻫ

:last-of-type

ﻝﺎﺜﻣ

p:last-of-type

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ،ﺖﺳﺍ ﻥﺁ ﺪﻟﺍﻭ <p> ﺮﺼﻨﻋ ﻦﯾﺮﺧﺁ ﻪﮐ ﺍﺭ <p> ﺮﺼﻨﻋ ﺮﻫ

:link

ﻝﺎﺜﻣ

a:link

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ﺍﺭ ﻩﺪﺸﻧ ﺪﯾﺩﺯﺎﺑ ﯼﺎﻫﺪﻧﻮﯿﭘ ﻪﻤﻫ

:not(selector)

ﻝﺎﺜﻣ

:not(p)

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ﺖﺴﯿﻧ <p> ﺮﺼﻨﻋ ﻪﮐ ﺍﺭ ﯼﺮﺼﻨﻋ ﺮﻫ

:nth-child(n)

ﻝﺎﺜﻣ

p:nth-child(2)

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ﺖﺳﺍ ﻥﺁ ﺪﻟﺍﻭ ﻡﻭﺩ ﺪﻧﺯﺮﻓ ﻪﮐ ﺍﺭ <p> ﺮﺼﻨﻋ ﺮﻫ

:nth-last-child(n)

ﻝﺎﺜﻣ

p:nth-last-child(2)

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐﯽﻣ ﺵﺭﺎﻤﺷ ﺪﻧﺯﺮﻓ ﻦﯾﺮﺧﺁ ﺯﺍ ،ﺖﺳﺍ ﻥﺁ ﺪﻟﺍﻭ ﻡﻭﺩ ﺪﻧﺯﺮﻓ ﻪﮐ ﺍﺭ <p> ﺮﺼﻨﻋ ﺮﻫ

:nth-last-of-type(n)

ﻝﺎﺜﻣ

p:nth-last-of-type(2)

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐﯽﻣ ﺵﺭﺎﻤﺷ ﺪﻧﺯﺮﻓ ﻦﯾﺮﺧﺁ ﺯﺍ ،ﺖﺳﺍ ﻥﺁ ﺪﻟﺍﻭ <p> ﺮﺼﻨﻋ ﻦﯿﻣﻭﺩ ﻪﮐ ﺍﺭ <p> ﺮﺼﻨﻋ ﺮﻫ

:nth-of-type(n)

ﻝﺎﺜﻣ

p:nth-of-type(2)

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ،ﺖﺳﺍ ﻥﺁ ﺪﻟﺍﻭ <p> ﺮﺼﻨﻋ ﻦﯿﻣﻭﺩ ﻪﮐ ﺍﺭ <p> ﺮﺼﻨﻋ ﺮﻫ

:only-of-type

ﻝﺎﺜﻣ

p:only-of-type

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ،ﺖﺳﺍ ﻥﺁ ﺪﻟﺍﻭ <p> ﺮﺼﻨﻋ ﺎﻬﻨﺗ ﻪﮐ ﺍﺭ <p> ﺮﺼﻨﻋ ﺮﻫ

:only-child

ﻝﺎﺜﻣ

p:only-child

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ﺖﺳﺍ ﻥﺁ ﺪﻟﺍﻭ ﺪﻧﺯﺮﻓ ﺎﻬﻨﺗ ﻪﮐ ﺍﺭ <p> ﺮﺼﻨﻋ ﺮﻫ

:optional

ﻝﺎﺜﻣ

input:optional

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ "ﯽﻣﺍﺰﻟﺍ" ﯽﮔﮋﯾﻭ ﻥﻭﺪﺑ ﺍﺭ <input> ﺮﺻﺎﻨﻋ

:out-of-range

ﻝﺎﺜﻣ

input:out-of-range

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ﺺﺨﺸﻣ ﻩﺩﻭﺪﺤﻣ ﺯﺍ ﺝﺭﺎﺧ ﯼﺭﺍﺪﻘﻣ ﺎﺑ ﺍﺭ <input> ﺮﺻﺎﻨﻋ

:read-only

ﻝﺎﺜﻣ

input:read-only

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ﻩﺪﺷ ﺺﺨﺸﻣ "readonly" ﻪﺼﺨﺸﻣ ﺎﺑ ﺍﺭ <input> ﺮﺻﺎﻨﻋ

:read-write

ﻝﺎﺜﻣ

input:read-write

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ "readonly" ﯽﮔﮋﯾﻭ ﻥﻭﺪﺑ ﺍﺭ <input> ﺮﺻﺎﻨﻋ

:required

ﻝﺎﺜﻣ

input:required

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ﻩﺪﺷ ﺺﺨﺸﻣ "ﻡﺯﻻ" ﯽﮔﮋﯾﻭ ﺎﺑ ﺍﺭ <input> ﺮﺻﺎﻨﻋ

:root

ﻝﺎﺜﻣ

root

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ﺍﺭ ﺪﻨﺳ ﻪﺸﯾﺭ ﺮﺼﻨﻋ

:target

ﻝﺎﺜﻣ

#news:target

ﻝﺎﺜﻣ ﺡﺮﺷ

(ﺪﯿﻨﮐ ﮏﯿﻠﮐ ﺮﮕﻨﻟ ﻡﺎﻧ ﻥﺁ ﯼﻭﺎﺣ URL ﯼﻭﺭ) ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ﺍﺭ ﯽﻠﻌﻓ ﻝﺎﻌﻓ news# ﺮﺼﻨﻋ

:valid

ﻝﺎﺜﻣ

input:valid

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ﺮﺒﺘﻌﻣ ﺭﺍﺪﻘﻣ ﺎﺑ ﺍﺭ <input> ﺮﺻﺎﻨﻋ ﻪﻤﻫ

:visited

ﻝﺎﺜﻣ

a:visited

ﻝﺎﺜﻣ ﺡﺮﺷ

ﺪﻨﮐ ﯽﻣ ﺏﺎﺨﺘﻧﺍ ﺍﺭ ﻩﺪﺷ ﺪﯾﺩﺯﺎﺑ ﯼﺎﻫﺪﻧﻮﯿﭘ ﻪﻤﻫ

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