Created
June 12, 2013 07:23
-
-
Save Potherca/5763424 to your computer and use it in GitHub Desktop.
Simple demonstration how nth-child works
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Simple demonstration how nth-child works */ | |
span { | |
width: 5em; | |
border: 0.1em solid; | |
display: inline-block; | |
text-align: center; | |
} | |
span:nth-child(5n) { | |
display: none; | |
} | |
span:nth-child(3n) { | |
visibility: hidden; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p> | |
<span>1</span> | |
<span>2</span> | |
<span>3</span> | |
<span>4</span> | |
<span>5</span> | |
<span>6</span> | |
<span>7</span> | |
<span>8</span> | |
<span>9</span> | |
<span>10</span> | |
<span>11</span> | |
<span>12</span> | |
<span>13</span> | |
<span>14</span> | |
<span>15</span> | |
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// alert('Hello world!'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment