OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <title>CSS Test: right float, polygon + shape-margin beyond margin box</
title> |
| 5 <link rel="author" title="Rebecca Hauck" href="mailto:rhauck@adobe.com"> |
| 6 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#funcdef-polygo
n"> |
| 7 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-outside-
property"> |
| 8 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-margin-p
roperty"> |
| 9 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#relation-to-bo
x-model-and-float-behavior"> |
| 10 <link rel="match" href="reference/shape-outside-polygon-017-ref.html"> |
| 11 <meta name="flags" content="ahem" /> |
| 12 <meta name="assert" content="The test verifies that when a shape-margin
is defined that |
| 13 extends beyond the margin box, the shape is
clipped to the |
| 14 box."> |
| 15 </head> |
| 16 <style> |
| 17 body { |
| 18 margin: 0; |
| 19 } |
| 20 #container { |
| 21 position: absolute; |
| 22 top: 50px; |
| 23 font: 40px/1 Ahem, sans-serif; |
| 24 width: 300px; |
| 25 height: 200px; |
| 26 color: green; |
| 27 text-align: right; |
| 28 } |
| 29 #test-shape { |
| 30 float: right; |
| 31 width: 180px; |
| 32 height: 160px; |
| 33 margin: 10px; |
| 34 shape-margin: 40px; |
| 35 shape-outside: polygon(0px 130px, 0px 180px, 200px 180px, 200px 0px, 160
px 0px, 160px 130px); |
| 36 } |
| 37 .line { |
| 38 position: absolute; |
| 39 top: 60px; |
| 40 width: 2px; |
| 41 height: 200px; |
| 42 border-left: 2px solid blue; |
| 43 } |
| 44 .right { |
| 45 left: 220px; |
| 46 } |
| 47 .left { |
| 48 left: 60px; |
| 49 } |
| 50 .failure { |
| 51 position: absolute; |
| 52 width: 40px; |
| 53 height: 40px; |
| 54 background-color: red; |
| 55 z-index: -1; |
| 56 } |
| 57 .square-1 { |
| 58 top: 90px; |
| 59 left: 180px; |
| 60 } |
| 61 .square-2 { |
| 62 top: 170px; |
| 63 left: 60px; |
| 64 } |
| 65 </style> |
| 66 <body> |
| 67 <p>The test passes if there there are two green squares between the blue lin
es. There should be no red.</p> |
| 68 <div id="container"> |
| 69 <div id="test-shape"></div> |
| 70 <br/> |
| 71 X |
| 72 <br/> |
| 73 <br/> |
| 74 X |
| 75 </div> |
| 76 <div class="left line"></div> |
| 77 <div class="right line"></div> |
| 78 <div class="failure square-1"></div> |
| 79 <div class="failure square-2"></div> |
| 80 </body> |
| 81 </html> |
| 82 |
OLD | NEW |