Skip to content

Instantly share code, notes, and snippets.

Created September 15, 2015 09:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/6eef1ee4b44a6861d97c to your computer and use it in GitHub Desktop.
Save anonymous/6eef1ee4b44a6861d97c to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/howebutawu
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=0,minimal-ui">
<title>JS Bin</title>
<style id="jsbin-css">
li:nth-child(1):nth-last-child(5),
li:nth-child(1):nth-last-child(5) ~ li {
background-color: pink;
}
</style>
</head>
<body>
<ul>
<li>0001</li>
<li>0002</li>
<li>0003</li>
<li>0004</li>
<li>0005</li>
</ul>
<script id="jsbin-source-css" type="text/css">li:nth-child(1):nth-last-child(5),
li:nth-child(1):nth-last-child(5) ~ li {
background-color: pink;
}</script>
</body>
</html>
li:nth-child(1):nth-last-child(5),
li:nth-child(1):nth-last-child(5) ~ li {
background-color: pink;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment