0714bd6328e0863aa440aa2e7edb5aa7f309e388.svn-base 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>z-index tests #1</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  6. <script type="text/javascript" src="../../test.js"></script>
  7. <style>
  8. div { font: 12px Arial; }
  9. span.bold { font-weight: bold; }
  10. #div1,#div3 {
  11. height: 80px;
  12. position: relative;
  13. border: 1px solid #669966;
  14. background-color: #ccffcc;
  15. padding-left: 5px;
  16. }
  17. #div2 {
  18. opacity: 0.8;
  19. z-index: 1;
  20. position: absolute;
  21. width: 150px;
  22. height: 200px;
  23. top: 20px;
  24. left: 170px;
  25. border: 1px solid #990000;
  26. background-color: #ffdddd;
  27. text-align: center;
  28. }
  29. #div4 {
  30. opacity: 0.8;
  31. z-index: 2;
  32. position: absolute;
  33. width: 200px;
  34. height: 70px;
  35. top: 65px;
  36. left: 50px;
  37. border: 1px solid #000099;
  38. background-color: #ddddff;
  39. text-align: left;
  40. padding-left: 10px;
  41. }
  42. </style>
  43. </head>
  44. <body>
  45. <div>
  46. <br />
  47. No z-indexed content
  48. <div id="div1">
  49. <br /><span class="bold">DIV #1</span>
  50. <br />position: relative;
  51. <div id="div2">
  52. <br /><span class="bold">DIV #2</span>
  53. <br />position: absolute;
  54. <br />z-index: 1;
  55. </div>
  56. </div>
  57. <br />
  58. <div id="div3">
  59. <br /><span class="bold">DIV #3</span>
  60. <br />position: relative;
  61. <div id="div4">
  62. <br /><span class="bold">DIV #4</span>
  63. <br />position: absolute;
  64. <br />z-index: 2;
  65. </div>
  66. </div>
  67. Some more non-zindexed content
  68. </div>
  69. </body>
  70. </html>