| <!DOCTYPE html> |
| <title>shape-outside-floats-ellipse-000-reference.html</title> |
| <link rel="author" title="Adobe" href="http://html.adobe.com/"> |
| <link rel="author" title="Bem Jones-Bey" href="mailto:bjonesbe@adobe.com"> |
| <meta name="flags" content="ahem dom"> |
| <style> |
| .container { |
| position: relative; |
| font: 20px/1 Ahem, sans-serif; |
| width: 500px; |
| height: 200px; |
| border: 1px solid black; |
| } |
| |
| .ellipse { |
| width: 320px; |
| height: 160px; |
| border-radius: 160px / 80px; |
| border: 1px solid blue; |
| } |
| |
| #left-ellipse-outline { |
| position: absolute; |
| z-index: -1; |
| top: 20px; |
| left: 0px; |
| } |
| |
| #right-ellipse-outline { |
| position: absolute; |
| z-index: -1; |
| top: 20px; |
| right: 0px; |
| } |
| |
| .left-ellipse-float-line { |
| float: left; |
| clear: left; |
| height: 20px; |
| } |
| |
| .right-ellipse-float-line { |
| float: right; |
| clear: right; |
| height: 20px; |
| } |
| </style> |
| |
| <body> |
| <p>The black squares should trace the right side of the ellipse's blue outline.</p> |
| <div class="container"> |
| X<br/> |
| <div id="left-ellipse-outline" class="ellipse"></div> |
| <!-- generated left-rounded-rect-float-line divs will be inserted here --> |
| X<br/> |
| X<br/> |
| X<br/> |
| X<br/> |
| X<br/> |
| X<br/> |
| X<br/> |
| X<br/> |
| X |
| </div> |
| |
| <p>The black squares should trace the left side of the ellipse's blue outline.</p> |
| <div class="container" style="text-align: right"> |
| X<br/> |
| <div id="right-ellipse-outline" class="ellipse"></div> |
| <!-- generated right-rounded-rect-float-line divs will be inserted here --> |
| X<br/> |
| X<br/> |
| X<br/> |
| X<br/> |
| X<br/> |
| X<br/> |
| X<br/> |
| X<br/> |
| X |
| </div> |
| </body> |
| |
| <script src="resources/rounded-rectangle.js"></script> |
| <script src="resources/subpixel-utils.js"></script> |
| <script> |
| // Note that the border must be added into the width to account for its |
| // affect on float positioning. |
| genLeftRightRoundedRectFloatShapeOutsideRefTest({ |
| roundedRect: {x: 0, y: 20, width: 321, height: 160, rx: 160, ry: 80}, |
| containerWidth: 500, |
| containerHeight: 200, |
| lineHeight: 20, |
| floatElementClassSuffix: "ellipse-float-line", |
| insertElementIdSuffix: "ellipse-outline" |
| }); |
| </script> |
| |
| </html> |