<strong>Best First-Person Shooters</strong>
<ol class="alternating-colors">
<li>
<strong>Half-Life 2</strong>
<p>Fight aliens, wear a head crab, learn about gravity</p>
</li>
<li>
<strong>Halo: Combat Evolved</strong>
<p>Fight aliens, wear an AI, learn about screen peeking siblings</p>
</li>
<li>
<strong>Team Fortress 2</strong>
<p>Fight non-alien residents, wear hats, learn about teamwork</p>
</li>
<li>
<strong>Tribes</strong>
<p>Ski, slip, and slide your way to victory</p>
</li>
</ol>
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap');
body {
font-family: 'Space Mono', monospace;
display: flex;
flex-direction: column;
max-width: 420px;
padding: 32px;
margin: 60px auto;
border: 1px solid #eee;
box-shadow: 0px 12px 24px rgba(0, 0, 0, 0.06);
}
* { // make it sexy
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizelegibility;
letter-spacing: -0.25px;
}
ol { padding-left: 50px; }
li {
color: #4F4F4F;
padding-left: 16px;
margin-top: 24px;
position: relative;
font-size: 16px;
line-height: 20px;
&:before {
content: '';
display: block;
height: 42px;
width: 42px;
border-radius: 50%;
border: 2px solid #ddd;
position: absolute; // yeah, you have to manually position it based on the text size, line height, etc. (in the parent li style). it's not the smarest solution
top: -12px;
left: -46px;
}
}
strong { color: #292929; }
ol.alternating-colors {
li:nth-child(odd):before { border-color: #0BAD02; }
li:nth-child(even):before { border-color: #2378D5; }
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.