| <!DOCTYPE HTML> |
| <meta charset="UTF-8"> |
| <title>CSS Toggles: toggle-visibility</title> |
| <link rel="author" title="L. David Baron" href="https://dbaron.org/"> |
| <link rel="author" title="Google" href="http://www.google.com/"> |
| <link rel="help" href="https://tabatkins.github.io/css-toggle/#toggle-visibility-property"> |
| <link rel="match" href="../reference/ref-filled-green-100px-square.xht"> |
| <style> |
| |
| body { |
| toggle-root: inactive-toggle 1 at 0; |
| } |
| |
| #container { |
| toggle-visibility: toggle inactive-toggle; |
| background: green; |
| width: 100px; |
| height: 100px; |
| } |
| |
| #child, #sibling { |
| height: 100px; |
| width: 100px; |
| background: red; |
| } |
| |
| #sibling { |
| margin-top: -100px; |
| } |
| |
| </style> |
| |
| <body> |
| |
| <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> |
| |
| <div id="container"> |
| <div id="child"></div> |
| </div> |
| <div id="sibling"></div> |