Skip to content

Commit f2c33c5

Browse files
committed
feat: pseudo-class
1 parent 9e3c00b commit f2c33c5

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

starter/03-CSS-Fundamentals/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ <h1>📘 The Code Magazine</h1>
2929
</header>
3030

3131
<article>
32+
<p>Test</p>
3233
<header>
3334
<h2>The Basic Language of the Web: HTML</h2>
3435

starter/03-CSS-Fundamentals/style.css

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,25 @@ aside {
8181
body {
8282
/* background-color: blue; */
8383
}
84+
85+
/* * Pseudo Class */
86+
li:first-child {
87+
font-weight: bold;
88+
}
89+
90+
li:last-child {
91+
font-style: italic;
92+
}
93+
94+
li:nth-child(even) {
95+
color: grey;
96+
}
97+
98+
/* * Just don't use on Descendent selectors */
99+
article p:first-child {
100+
color: red;
101+
}
102+
103+
article p:last-child {
104+
color: red;
105+
}

0 commit comments

Comments
 (0)