Skip to content

Commit 8fbe8e3

Browse files
committed
added couple more applied rule example
1 parent d946c21 commit 8fbe8e3

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

css.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,24 @@ <h2>8. applied rule</h2>
210210
&lt;style&gt;<br/> ul#awesome {<br/> color: red;<br/> }<br/> ul.shopping-list li.favorite span {<br/> color: blue;<br/> }<br/>&lt;/style&gt;
211211
</code></pre>
212212
<p><strong>Answer:</strong> blue</p>
213+
<br>
214+
<strong>d.</strong>
215+
<pre><code>
216+
&lt;style&gt;<br/> ul#awesome #must-buy {<br/> color: red;<br/> }<br/> .favorite span {<br/> color: blue!important;<br/> }<br/>&lt;/style&gt;<br/>
217+
</code></pre>
218+
<p><strong>Answer:</strong> blue</p>
219+
<br>
220+
<strong>e.</strong>
221+
<pre><code>
222+
&lt;style&gt;<br/> ul.shopping-list li .highlight {<br/> color: red;<br/> }<br/> ul.shopping-list li .highlight:nth-of-type(odd) {<br/> color: blue;<br/> }<br/>&lt;/style&gt;<br/>
223+
</code></pre>
224+
<p><strong>Answer:</strong> blue</p>
225+
<br>
226+
<strong>f.</strong>
227+
<pre><code>
228+
&lt;style&gt;<br/> #awesome .favorite:not(#awesome) .highlight {<br/> color: red;<br/> }<br/> #awesome .highlight:nth-of-type(1):nth-last-of-type(1) {<br/> color: blue;<br/> }<br/>&lt;/style&gt;<br/>
229+
</code></pre>
230+
<p><strong>Answer:</strong> red</p>
213231
ref: <a href="http://davidshariff.com/quiz/">David Shariff: quiz</a>
214232
</div>
215233
<!-- <div id="optional_tag">

0 commit comments

Comments
 (0)