|
| 1 | +<!-- |
| 2 | +* @author Niklas von Hertzen <niklas at hertzen.com> |
| 3 | +* @created 15.7.2011 |
| 4 | +* @website http://hertzen.com |
| 5 | +--> |
| 6 | +<!DOCTYPE html> |
| 7 | +<html> |
| 8 | + <head> |
| 9 | + <title>z-index tests #2</title> |
| 10 | + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 11 | + <link href="#" type="text/css" rel="stylesheet"> |
| 12 | + <script type="text/javascript" src="../external/jquery-1.6.2.min.js"></script> |
| 13 | + <script type="text/javascript" src="../build/html2canvas.js"></script> |
| 14 | + <script type="text/javascript" src="../build/jquery.plugin.html2canvas.js"></script> |
| 15 | + <script type="text/javascript"> |
| 16 | + $(window).ready(function() { |
| 17 | + |
| 18 | + $('body').html2canvas({ |
| 19 | + logging:true |
| 20 | + }); |
| 21 | + }); |
| 22 | + </script> |
| 23 | + |
| 24 | + <style type="text/css"> |
| 25 | + |
| 26 | + div { font: 12px Arial; } |
| 27 | + |
| 28 | + span.bold { font-weight: bold; } |
| 29 | + |
| 30 | + #div2 { z-index: 2; } |
| 31 | + #div3 { z-index: 1; } |
| 32 | + #div4 { z-index: 10; } |
| 33 | + |
| 34 | + #div1,#div3 { |
| 35 | + height: 80px; |
| 36 | + position: relative; |
| 37 | + border: 1px dashed #669966; |
| 38 | + background-color: #ccffcc; |
| 39 | + padding-left: 5px; |
| 40 | + } |
| 41 | + |
| 42 | + #div2 { |
| 43 | + opacity: 0.8; |
| 44 | + position: absolute; |
| 45 | + width: 150px; |
| 46 | + height: 200px; |
| 47 | + top: 20px; |
| 48 | + left: 170px; |
| 49 | + border: 1px dashed #990000; |
| 50 | + background-color: #ffdddd; |
| 51 | + text-align: center; |
| 52 | + } |
| 53 | + |
| 54 | + #div4 { |
| 55 | + opacity: 0.8; |
| 56 | + position: absolute; |
| 57 | + width: 200px; |
| 58 | + height: 70px; |
| 59 | + top: 65px; |
| 60 | + left: 50px; |
| 61 | + border: 1px dashed #000099; |
| 62 | + background-color: #ddddff; |
| 63 | + text-align: left; |
| 64 | + padding-left: 10px; |
| 65 | + } |
| 66 | + |
| 67 | + #div5{ |
| 68 | + border: 1px dashed #669966; |
| 69 | + background-color: #ccffcc; |
| 70 | + padding-left: 5px; |
| 71 | + position:relative; |
| 72 | + margin-bottom:-15px; |
| 73 | + height:50px; |
| 74 | + margin-top:10px; |
| 75 | + |
| 76 | + } |
| 77 | + |
| 78 | + #div6{ |
| 79 | + border: 1px dashed #000099; |
| 80 | + background-color: #ddddff; |
| 81 | + text-align: left; |
| 82 | + padding-left: 10px; |
| 83 | + |
| 84 | + } |
| 85 | + |
| 86 | + </style></head> |
| 87 | + |
| 88 | + <body> |
| 89 | + |
| 90 | + <br /> |
| 91 | + |
| 92 | + <div id="div1"> |
| 93 | + <br /><span class="bold">DIV #1</span> |
| 94 | + <br />position: relative; |
| 95 | + <div id="div2"> |
| 96 | + <br /><span class="bold">DIV #2</span> |
| 97 | + <br />position: absolute; |
| 98 | + <br />z-index: 2; |
| 99 | + </div> |
| 100 | + </div> |
| 101 | + |
| 102 | + <br /> |
| 103 | + |
| 104 | + <div id="div3"> |
| 105 | + <br /><span class="bold">DIV #3</span> |
| 106 | + <br />position: relative; |
| 107 | + <br />z-index: 1; |
| 108 | + <div id="div4"> |
| 109 | + <br /><span class="bold">DIV #4</span> |
| 110 | + <br />position: absolute; |
| 111 | + <br />z-index: 10; |
| 112 | + </div> |
| 113 | + </div> |
| 114 | + |
| 115 | + <div id="div5"><br />DIV #5<br />position:relative;<br /></div> |
| 116 | + |
| 117 | + <div id ="div6"><br />DIV #6<br />position:static;<br /></div> |
| 118 | + |
| 119 | + </body> |
| 120 | +</html> |
0 commit comments