Dieťa css

Príklady kódu

14
0

nth-dieťa () css

/* Selects the second <li> element in a list */
li:nth-child(2) { 
  color: lime;
}

/* Selects every fourth element
   among any group of siblings */
:nth-child(4n) {
  color: lime;
}
9
0

css nepárne dieťa

tr:nth-child(even) {background: #CCC}
tr:nth-child(odd) {background: #FFF}
7
0

CSS n-té dieťa

:nth-child(3) { //the number is the child number you are targeting
	//styles here 
}
7
0

dieťa css

  p:nth-child(2)
 	{     
 		background: red;
 	}
4
0

vyberte aj dieťa css

li:nth-child(even) { /* Selects only even elements */
    color: green;   
}
3
0

výber dieťaťa css

/*
	Descendant selectors are used to match to any nested element. 
	Child combinators, on the other hand, only match to the direct 
	child element and are defined by the greater than symbol. 
	The selector on the right must be the direct child of the element 
	on the left.
*/
/* child combinator */ 
  parent > child {...}

/* descendant selector */ 
  parent child {...}
  ancestor descendant {...}

V iných jazykoch

Táto stránka je v iných jazykoch

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................