Skip to content

Commit 0a5434f

Browse files
张欧文张欧文
张欧文
authored and
张欧文
committed
finish course 028 pesudo classes
1 parent aeb0b47 commit 0a5434f

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

starter/03-CSS-Fundamentals/index.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ <h3>What is HTML?</h3>
7777
<p>In HTML, each element is made up of 3 parts:</p>
7878

7979
<ol>
80-
<li>The opening tag</li>
80+
<li class="first-li">The opening tag</li>
8181
<li>The closing tag</li>
8282
<li>The actual element</li>
8383
</ol>
@@ -99,7 +99,9 @@ <h3>Why should you learn HTML?</h3>
9999
</p>
100100

101101
<ul>
102-
<li>To be able to use the fundamental web dev language</li>
102+
<li class="first-li">
103+
To be able to use the fundamental web dev language
104+
</li>
103105
<li>
104106
To hand-craft beautiful websites instead of relying on tools like
105107
Worpress or Wix
@@ -116,7 +118,7 @@ <h3>Why should you learn HTML?</h3>
116118
<h4>Related posts</h4>
117119

118120
<ul class="related">
119-
<li>
121+
<li class="first-li">
120122
<img
121123
src="img/related-1.jpg"
122124
alt="Person programming"

starter/03-CSS-Fundamentals/style.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,19 @@ aside {
7676
/* body {
7777
background-color: blue;
7878
} */
79+
80+
/* .first-li {
81+
font-weight: bold;
82+
} */
83+
84+
li:first-child {
85+
font-weight: bold;
86+
}
87+
88+
li:last-child {
89+
font-style: italic;
90+
}
91+
92+
li:nth-child(2) {
93+
color: red;
94+
}

0 commit comments

Comments
 (0)