Skip to content

Instantly share code, notes, and snippets.

@hdragomir
Created July 2, 2012 12:13
Show Gist options
  • Save hdragomir/3032958 to your computer and use it in GitHub Desktop.
Save hdragomir/3032958 to your computer and use it in GitHub Desktop.

Revisions

  1. hdragomir created this gist Jul 2, 2012.
    19 changes: 19 additions & 0 deletions dabblet.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    /**
    * Weird behavior when combining opacity & z-index: -1
    */

    div {
    position: relative;
    width: 200px; height: 200px;
    background: yellowgreen;

    /* Try commenting this or setting it to 1: */
    opacity: .9;
    }

    div > div {
    position:absolute;
    z-index: -1;
    width: 200px; height: 200px;
    background: #d00;
    }
    3 changes: 3 additions & 0 deletions dabblet.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    <div>
    <div></div>
    </div>
    1 change: 1 addition & 0 deletions settings.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    {"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}