File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ Using Elements as Images: the ''element()'' notation</h3>
208208
209209 <pre>
210210 <style>
211- #src { color: white; background: lime; width: 300px; height: 40px; }
211+ #src { color: white; background: lime; width: 300px; height: 40px; position: relative; }
212212 #dst { color: black; background: element(#src); padding: 20px; margin: 20px 0; }
213213 </style>
214214 <p id='src' >I'm an ordinary element!</p>
@@ -279,9 +279,9 @@ Using Elements as Images: the ''element()'' notation</h3>
279279
280280 <pre>
281281 <!DOCTYPE html>
282- <p id='one' style="display:none;">one</p>
282+ <p id='one' style="display:none; position: relative; ">one</p>
283283 <iframe src="http://example.com">
284- <p id='two' >I'm fallback content!</p>
284+ <p id='two' style="position: relative;" >I'm fallback content!</p>
285285 </iframe>
286286 <ul>
287287 <li style="background: element(#one);">
@@ -326,6 +326,10 @@ Using Elements as Images: the ''element()'' notation</h3>
326326 }
327327 </script>
328328 <style>
329+ .slide {
330+ /* Need to be a stacking context to be element()-able. */
331+ position: relative;
332+ }
329333 #prev-preview, #next-preview {
330334 position: fixed;
331335 ...
You can’t perform that action at this time.
0 commit comments