شما اینجا هستید

ترکیب کننده، از ارتباط بین سلکتورها برای انتخاب یک سلکتور خاص استفاده میکند.

سلکتور CSS میتواند یک یا چند سلکتور ساده را شامل شود. میتوانیم در بین سلکتورها، یک ترکیب دهنده قرار دهیم.

چهار نوع ترکیب دهنده متفاوت در CSS وجود دارد:

  • سلکتور نسل
  • سلکتور فرزند
  • سلکتور خواهر و برادر مجاور
  • سلکتور خواهر و برادر عمومی

با هر کدام از ترکیب دهنده های نامبرده در ادامه آشنا خواهیم شد.

سلکتور نسل - Descendant Selector

انتخابگر نسل همه عناصری که از نسل عنصر مشخص شده هستند را انتخاب میکند.

مثال زیر همه عناصر <p> درون عناصر <div> را انتخاب میکند:

<html>

<head>

<style>

div p {

    background-color: yellow;

}

</style>

</head>

<body>


<div>

  <p>Paragraph 1 in the div.</p>

  <p>Paragraph 2 in the div.</p>

  <span><p>Paragraph 3 in the div.</p></span>

</div>


<p>Paragraph 4. Not in a div.</p>

<p>Paragraph 5. Not in a div.</p>


</body>

</html>

 

گزینشگر فرزند – child selector

گزینشگر فرزند همه عناصری را که به صورت مستقیم فرزند عنصر مشخص شده هستند را گزینش میکند.

مثال زیر همه عناصر <p> را که فرزند مستقیم، عنصر <div> هستند را مشخص میکند :

<html>

<head>

<style>

div > p {

    background-color: yellow;

}

</style>

</head>

<body>


<div>

  <p>Paragraph 1 in the div.</p>

  <p>Paragraph 2 in the div.</p>

  <span><p>Paragraph 3 in the div.</p></span> <!-- not Child but Descendant -->

</div>


<p>Paragraph 4. Not in a div.</p>

<p>Paragraph 5. Not in a div.</p>


</body>

</html>

 

گزینشگر خواهر و برادر همجوار – adjacent sibling selector

گزینشگر خواهر و برادر مجاور همه عناصری را که با عنصر مشخص شده همجوار هستند را گزینش میکند. عناصر خواهر و برادر باید عنصر والد یکسانی داشته باشند.

در اینجا همجوار یعنی عناصری که دقیقاً بعد از هم نوشته شوند.

مثال زیر همه عناصر <p> که دقیقاً بعد از عناصر <div> نوشته شده اند را گزینش میکند:

<html>

<head>

<style>

div + p {

    background-color: yellow;

}

</style>

</head>

<body>


<div>

<p>Paragraph 1 in the div.</p>

<p>Paragraph 2 in the div.</p>

</div>


<p>Paragraph 3. Not in a div.</p>

<p>Paragraph 4. Not in a div.</p>


</body>

</html>

 

گزینشگر خواهر و برادر عمومی – general sibling selector

گزینشگر خواهر و برادر عمومی همه عناصر خواهر و برادر با عنصر مشخص شده را گزینش میکند.

مثال پایین همه عناصر <p> که با عناصر <div> خواهر و برادر هستند را انتخاب میکند:

<html>

<head>

<style>

div ~ p {

    background-color: yellow;

}

</style>

</head>

<body>


<div>

<p>Paragraph 1 in the div.</p>

<p>Paragraph 2 in the div.</p>

</div>


<p>Paragraph 3. Not in a div.</p>

<p>Paragraph 4. Not in a div.</p>


</body>

</html>

 

دیدگاه‌ها

quick cash loans roseburg or quick and easy loans online quick loan quick loans calculator quick payday loans today

quick 200 dollar loans quick pay payday loans new york state threatens to garnish quick loans quick and loans odds to win 2017 quick loans for bad credit

quick loans no credit check same day quick loans in south carolina quick loans quick personal loans online quick funding loans freedom card

quick loans phoenix az quick loans no credit check quick loans quick cash loans roseburg or online quick cash loans

https://paydailoanz.com/# - quick loans

quick loans online quick loans direct quick loan cash loans quick low interet rate quick loans

quick loans albany ga quick loans under 500 quick loan quick safe loans 50000 quick loans

https://paydailoanz.com/# - quick loans

how to make money on instagram how to make money blogging work from home how to make extra money from home how to make money on twitch

how to make money from home how to make money on amazon work from home where did nancy pelosi make her money make money at home

https://make-money-blogs.com/# - work from home

make money at home how to make money online fast make money how to make money on youtube videos how much money can you make on disability

how much money do youtubers make easy way to make money work from home ways to make money on the side how to make money

https://make-money-blogs.com/# - work from home

how to make money on youtube how to make money on the internet work from home how much money can you make on youtube how to make money on twitch

ways to make money fast how does venmo make money make money make money on youtube make money taking surveys

https://make-money-blogs.com/# - make money

where did nancy pelosi make her money photos imgclick easily make money sharing will friends social free file upload work from home make money taking surveys make money online free

how to make money on facebook make money make money how to make money without a job how can i make money

https://make-money-blogs.com/# - work from home

where did nancy pelosi make her money how did tom steyer make his money work from home how to make money on the internet make money fast

ways to make money from home how to make money with a website make money how to make money online how to earn money online or gift cards to amazon best ways to make money online

http://www.bioxplorer.ru/ - work from home

how much money do youtubers make best ways to make money work from home how to make money on youtube videos best way to make money online

how did tom steyer make his money how did tom steyer make his money make money how do youtubers make money how does robinhood make money

https://kotosinog.ru/ - make money

how did jerry jones make his money how does robinhood make money make money best ways to make money make money online from home

how much money do youtubers make how to make money online how to earn money online or gift cards to amazon make money best ways to make money online how does craigslist make money

http://www.generalfinances.ru/ - make money

how to make money with a website make money from home work from home ways to make money online how to make money

ways to make money at home how do youtubers make money make money how to make money with bitcoin how to make money from home

http://saconsult.ru/ - work from home

cbd oil cbd cream cbd online buy hemp

how to make extra money easy ways to make money online make money legit ways to make money online how to make money on the side

how to make extra money how do you make money on youtube work from home how to make money fast make money online fast

https://kotorotvi.ru/ - work from home

teletech work from home making money with pornhub smart passive income free money online how does craigslist make money

makw money online making money online work at home jobs legitimate how to make money from home ways to make money fast

https://make-money-blogs.com/# - best way to make passive income

making money on youtube amazon work from home how to make extra money from home passive income online part time work from home

legitimate work from home jobs how to make money fast how much money does pewdiepie make work from home data entry amazon work from home

https://make-money-blogs.com/# - work at home jobs legitimate

work from home data entry making money from home how does craigslist make money best way to make money online how to make passive income

make money blogging work at home companies work from home opportunities western union online send money make money online fast

https://make-money-blogs.com/# - how to make money on the internet

how to make extra money from home making money online make money online from home make money online fast how to make money online fast

online poker real money teletech work from home make money online free passive income ideas how to make money

https://make-money-blogs.com/# - walmart money transfer online

how long does coronavirus last coronavirus in dogs COVID-19 pills coronavirus structure coronavirus in infants

coronavirus isolation precautions coronavirus 0c43 coronavirus test coronavirus test coronavirus structure

https://pharm-usa-official.com/coronavirus/# - human sars coronavirus

feline coronavirus symptoms coronavirus in calves coronavirus in calves canine coronavirus vaccine coronavirus genome

coronavirus in horses canine coronavirus [url=https://pharm-usa-official.com/coronavirus/# ] coronavirus in cattle[/url] cdc mers coronavirus coronavirus precautions

https://pharm-usa-official.com/coronavirus/# - fip coronavirus

osrs money making guide diy crafts that make money how to make more money make money online make money online from home

work from home jobs legitimate passive income [url=https://make-money-blogs.com/# ] real work from home jobs[/url] how does craigslist make money passive income online

https://make-money-blogs.com/# - money online

online money work at home companies make money online from home how to make extra money work from home jobs legitimate

western union online send money work from home opportunities [url=https://make-money-blogs.com/# ] make extra money from home[/url] real work from home jobs fifth harmony work from home

https://make-money-blogs.com/# - what is passive income

cialis online

[url=https://wowcialisnow.com/# ] cialis cialis generic[/url]

https://wowcialisnow.com/# - cialis buy cialis online

cialis 20mg

[url=https://wowcialisnow.com/# ] generic cialis online[/url]

https://wowcialisnow.com/# - online cialis

healthy recipes for weight loss precious weight loss best weight loss pill meal replacement shakes for weight loss melissa mccarthy weight loss

red mountain weight loss rebel wilson weight loss [url=https://weight-loss-blogs.com/# ] apple cider vinegar weight loss[/url] weight loss medication lexapro weight loss

https://weight-loss-blogs.com/# - honey boo boo weight loss

generic cialis 20mg

[url=https://wowcialisnow.com/# ] cheap cialis[/url]

https://wowcialisnow.com/# - cialis cialis online

fast weight loss lemon and cucumber water for weight loss weight loss calculator kelly clarkson weight loss weight loss calculator

weight loss pills quick weight loss [url=https://weight-loss-blogs.com/# ] weight loss diet[/url] before and after weight loss medical weight loss

https://weight-loss-blogs.com/# - weight loss foods

generic cialis

[url=https://wowcialisnow.com/# ] cialis generic cialis[/url]

https://wowcialisnow.com/# - buy cialis online

cialis 20mg

[url=https://wowcialisnow.com/# ] cialis cialis online[/url]

https://wowcialisnow.com/# - cialis cialis online

buy cialis

[url=https://wowcialisnow.com/# ] online cialis[/url]

https://wowcialisnow.com/# - cialis 20mg

unexplained weight loss lexapro weight loss fast weight loss weight loss smoothies weight loss clinic near me

weight loss smoothies best protein powder for weight loss [url=https://weight-loss-blogs.com/# ] weight loss calculator[/url] precious weight loss intermittent fasting weight loss

https://weight-loss-blogs.com/# - apple cider vinegar for weight loss

kirsten vangsness weight loss best foods for weight loss weight loss calculator medi weight loss morning smoothies for weight loss and energy

best weight loss supplement beth chapman weight loss [url=https://weight-loss-blogs.com/# ] calorie calculator for weight loss[/url] weight loss calorie calculator gabourey sidibe weight loss

https://weight-loss-blogs.com/# - weight loss programs

generic cialis online

[url=https://wowcialisnow.com/# ] buy generic cialis online[/url]

https://wowcialisnow.com/# - generic cialis 20mg

before and after weight loss best weight loss supplements celine dion weight loss lexapro weight loss prescription weight loss pills

weight loss smoothies jorge garcia weight loss [url=https://weight-loss-blogs.com/# ] calorie calculator for weight loss[/url] rebel wilson weight loss kelly clarkson weight loss

https://weight-loss-blogs.com/# - weight loss programs

optivia weight loss medical weight loss best weight loss pills precious weight loss kelly clarkson weight loss 2018

unexplained weight loss metformin for weight loss [url=https://weight-loss-blogs.com/# ] meal plan for weight loss[/url] best foods for weight loss protein shakes for weight loss

https://weight-loss-blogs.com/# - fast weight loss

meal plan for weight loss red mountain weight loss weight loss pills weight loss coffee shark tank weight loss drink

macros for weight loss best weight loss pill [url=https://weight-loss-blogs.com/# ] apple cider vinegar weight loss[/url] weight loss foods fast weight loss

https://weight-loss-blogs.com/# - best weight loss pill

weight loss calorie calculator yoga for weight loss weight loss pills best weight loss pills morning smoothies for weight loss and energy

reddit weight loss rapid weight loss [url=https://weight-loss-blogs.com/# ] weight loss before and after[/url] keto weight loss pills keely shaye smith weight loss

https://weight-loss-blogs.com/# - keto weight loss

golo weight loss beth chapman weight loss celine dion weight loss sota weight loss best foods for weight loss

dr oz weight loss quick weight loss [url=https://weight-loss-blogs.com/# ] before and after weight loss[/url] weight loss plateau best weight loss pills

https://weight-loss-blogs.com/# - before and after weight loss

viagra and metoprolo succinate what is the price of generic viagra in mexico viagra best way to take viagra pill recording after husband's viagra

lowest price generic viagra 100mg viagra like supplements [url=https://pharm-usa-official.com/# #]viagra [/url] viagra treatment for the heart problems can women take viagra what happens

https://pharm-usa-official.com - viagra

step sister viagra viagra average age viagra taking expired viagra viagra overdose

viagra doses viagra girls [url=https://pharm-usa-official.com/# #]viagra [/url] first time using viagra viagra increases risk

https://pharm-usa-official.com - viagra

viagra dosage? puedo tomar viagra si tenego alta precion viagra mister viagra viagra or cialis

free viagra son takes viagra [url=https://pharm-usa-official.com/# #]viagra [/url] new viagra white pill for men women & viagra meme

https://pharm-usa-official.com - viagra

stepsis makes stepbro's viagra boner won't go away viagra erection after ejaculation viagra nizagara vs viagra stepsis makes stepbro's viagra boner won't go away

guys on viagra viagra online doctor [url=https://pharm-usa-official.com/# #]viagra [/url] bing beauty viagra viagra pills generic

https://pharm-usa-official.com - viagra

صفحه‌ها

افزودن دیدگاه جدید

دیدگاه

  • تگ‌های HTML مجاز: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <img>
  • خطوط و پاراگراف‌ها بطور خودکار اعمال می‌شوند.
  • نشانی صفحه‌ها وب و پست الکترونیک بصورت خودکار به پیوند تبدیل می‌شوند.

Plain text

  • تگ‌های HTML مجاز نیستند.
  • نشانی صفحه‌ها وب و پست الکترونیک بصورت خودکار به پیوند تبدیل می‌شوند.
  • خطوط و پاراگراف‌ها بطور خودکار اعمال می‌شوند.
كد امنيتي
این پرسش برای جلوگیری از ارسال اسپمهای اتوماتیک است.