Skip to content

Instantly share code, notes, and snippets.

Created September 15, 2015 09:05

Revisions

  1. @invalid-email-address Anonymous created this gist Sep 15, 2015.
    31 changes: 31 additions & 0 deletions index.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,31 @@
    <!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>
    5 changes: 5 additions & 0 deletions jsbin.howebutawu.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    li:nth-child(1):nth-last-child(5),
    li:nth-child(1):nth-last-child(5) ~ li {
    background-color: pink;

    }