shape-outside-border-box-003.html (1636B)
1 <!DOCTYPE html> 2 <title>CSS Test: right float, shape-outside:border-box and shape-margin</title> 3 <link rel="author" title="Xianzhu Wang" href="mailto:wangxianzhu@chromium.org"> 4 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#funcdef-inset"> 5 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-outside-property"> 6 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-margin-property"> 7 <link rel="match" href="reference/shape-outside-padding-box-003-ref.html"/> 8 <meta name="flags" content="ahem" /> 9 <meta name="assert" content="The test verfies a shape with shape-outside:border-box 10 and shape-margin has rounded corners."> 11 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 12 <style> 13 #container { 14 position: relative; 15 width: 200px; 16 height: 200px; 17 overflow: hidden; 18 margin-left: 25px; 19 } 20 #test-container { 21 /* Allow at most 1.5 glyphs to overflow the left edge of #container. */ 22 margin-left: -30px; 23 width: 230px; 24 height: 200px; 25 font: 20px/1 Ahem; 26 background-color: red; 27 color: green; 28 text-align: right; 29 } 30 #test-shape { 31 float: right; 32 width: 15px; 33 height: 10px; 34 margin: 95px 65px 95px 120px; 35 shape-margin: 70px; 36 shape-outside: border-box; 37 } 38 #static-shape { 39 position: absolute; 40 left: 50px; 41 top: 20px; 42 width: 150px; 43 height: 160px; 44 background-color: green; 45 } 46 </style> 47 <p>The test passes if there is a green square and no red.</p> 48 <div id="container"> 49 <div id="test-container"> 50 <div id="test-shape"></div> 51 XXXXXXXXXX XXXXX XXXX XXX XXX XXX XXX XXXX XXXXX XXXXXXXXXX 52 <div id="static-shape"></div> 53 </div> 54 </div>